Removing padding from first menu items
-
I can’t remove the padding on the left of the first menu tile (Shop). How do I remove or hide the padding? It seemed to work fine until I moved the menu items around. Does the below work and am I not hiding the right menu item? How do I find the right menu item to hide?
http://www.erinwilliamswatercolors.com
/* Shop – Vibrant Purple*/
li.menu-item-36 a{
background: #f6cd51;}
li.menu-item-370 a{
background: #660066;}.sample-page li.menu-item-36 a{display:none;}
.sample-page li.menu-item-370 a{
background:#660066;
background-image: url(http://www.erinwilliamswatercolors.com/wp-content/uploads/2014/07/Delicious-Day-Originals-for-Sale-Menu-Button.jpg);
background-repeat: no-repeat;
background-position:bottom;
height:136px;
width:182px;
text-align:center;
}
-
Perhaps you already worked it out, as there is no left padding around the menu
li
element of the first item “Shop” when I view the link is FireFox?Actually, there is no left padding around any of the menu
li
elements. The only padding is a 7px box (top, right, bottom and left sides) on the menuli a
elements. Is that the padding you mean you want to remove? If so, try:ul#menu-topnav li:first-child a { padding-left: 0; }
Oh, and when you post code into the forums, it’s best to wrap the code so the browser doesn’t attempt to process/caught as spam. For more information, please review: Forum_Welcome#Posting_Code
Thanks for your help, Chris. Yes, I was able to get some help to fix this problem.
I believe the following was used to remedy the spacing issues:
ul#menu li.first-child {border-left:none;} display:inline; padding-left: 10px; margin-left:12px; margin-right:5px; border-left: 0px solid #ffff00; }
Thanks for the posting tip also.
Great to hear you got it to work, but I’ll take your word for it as the code you posted doesn’t look correct. The closing
}
after your firstborder-left
reference will terminate the statement and the references after that won’t be processed by the browser (or associated with theul#menu li.first-child
).
- The topic ‘Removing padding from first menu items’ is closed to new replies.