css - Wordpress Twenty Twelve - Social icons in navigation menu -


im tryin social icons in navigation menu. i've done following steps:

  1. add new link navigation
  2. css class example "menu-twitter"
  3. createad mapp in child-theme folder "images"
  4. imported twitter.png

  5. added following code in style.css

    .menu-facebook {     text-indent: -9999px;     background-image: url(images/facebook.png) !important;     background-repeat: no-repeat !important;     margin-left: 100px !important;      width: 50px;  }  .menu-facebook a:hoover {     background: #f5f5f5 !important; }  .menu-twitter {     text-indent: -9999px;     background-image: url(images/twitter.png) !important;     background-repeat: no-repeat !important;     margin-left: 100px !important;      width: 50px;  }  .menu-instagram {     text-indent: -9999px;     background-image: url(images/instagram.png) !important;     background-repeat: no-repeat !important;     margin-left: 100px !important;      width: 50px;  }  .menu-instagram a:hoover {     background: #f5f5f5; } 

check out site hkochd.suplife.se

i can't click on , positioned wierd, doing wrong?

*sorry bad english.

the problem here is, links anchored <a> tag inside <li> tag. code indenting anchor out of page.

to avoid can apply css tag rather <li> tag.

here modified code should work

.menu-facebook {     text-indent: -9999px;     background-image: url(images/facebook.png) !important;     background-repeat: no-repeat !important;     margin-left: 100px !important;      width: 50px;  } .menu-facebook a:hover {     background: #f5f5f5 !important; } .menu-twitter {     text-indent: -9999px;     background-image: url(images/twitter.png) !important;     background-repeat: no-repeat !important;     margin-left: 100px !important;      width: 50px;  } .menu-instagram {     text-indent: -9999px;     background-image: url(images/instagram.png) !important;     background-repeat: no-repeat !important;     margin-left: 100px !important;      width: 50px;  } .menu-instagram a:hover {     background: #f5f5f5; } 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -