html5 - Add link to CSS image -


i having problems trying add link css image after every link, text works not image right of it, how can fix it? thanks.

<nav>     <!-- top menu -->     <ul>         <li><a href="index.html">home</a></li>           <li><a href="materials_list.html">materials</a></li>         <li><a href="screened_loam.html">screened loam/topsoil</a></li>         <li><a href="rap.html">rap</a></li>         <li><a href="asphalt.html">asphalt/concrete disposals</a></li>         <li><a href="delivery.html">delivery</a></li>         <li><a href="contact_us.html">contact</a></li>     </ul>     <!-- /top menu --> </nav>  .header nav ul li:after {     content:'';     background:url(../images/sprite.png) 6px 7px no-repeat;     float:left;     display:block;     width:12px;     height:12px; } 

your after tag not apanding inner of tag.

you need aply

:after <a> element, not <li>:  .header nav ul li a:after { ... }  

so image can inside tag , link work properly.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -