Jump to content

How to apply css to menu links


newcoder1010
 Share

Recommended Posts

Hi,

 

html:

<section id="block-menu-menu-jn" class="block block-menu col-sm-12 col-md-5 contextual-links-region clearfix">
         <ul class="menu nav">
		         <li class="first leaf"><a href="https://www.facebook.com/xpressautosale" title="">F</a></li>
			 <li class="leaf"><a href="https://twitter.com/XpressAutoSale1" title="">T</a></li>
			 <li class="leaf"><a href="https://plus.google.com/+XpressAutoShopAtlanticCity/posts" title="">g</a></li>
			 <li class="last leaf"><a href="http://youtube.com/channel/UC7_GywWhwjF--TK7XWXJjhA" title="">y</a></li>
         </ul>
</section>

css:

 

working for first n last.

#block-multiblock-2 a { color: transparent;}
#block-multiblock-2 .first {  background-image: url("facebook.png"); background-size: 30px 25px; background-repeat: no-repeat;}
#block-multiblock-2 .last {  background-image: url("facebook.png"); background-size: 30px 25px; background-repeat: no-repeat;}

How to apply css to 2nd and third links. Below did not work. Can you help?

#block-multiblock-2  ul.menu.nav li:nth-of-type(2) {  background-image: url("tw.png"); background-size: 30px 25px; background-repeat: no-repeat;}
#block-multiblock-2  ul.menu.nav li:nth-of-type(3) {  background-image: url("yt.png"); background-size: 30px 25px; background-repeat: no-repeat;}
Thanks.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...