Remove Left Margin in Sub-Menu
-
Hi Tom,
This seems so basic but I have tried numerous things and just can’t seem to get rid of the space on the left side of the sub-menu’s at http://awesomewebsites4u.com/
Can you please tell me how to code it.
Many thanks!
-
The padding inside the sub-menu items? It’s good to have those aligned with the parent text – easier on the eye.
Of course, if you want to change it, this CSS should help:
.main-navigation .main-nav ul ul li a { padding-left: 10px; padding-right: 10px; }Good point. In that case how do I make a wider margin on the right side so that it looks balanced?
Thanks!
The padding on each side is equal.
You can reduce the width of the sub-menu if you like?
.main-navigation ul ul { width: 200px; }I would think it should be equal too but it isn’t. The main links are equal and the sub-menu looks OK (if not equal) but If you go to
http://awesomewebsites4u.com/click on Our Services -> Pressure Washing
the drop down menu has about 20 px on the left and only about 5 px on the right.
Looks like this is being caused by the following CSS you added:
.sub-menu { white-space: nowrap; }Remove that and the issue should go away 🙂
Ahhh, bless your dear heart! Thank you so much. I needed to put
.main-navigation .main-nav ul ul li a instead of .sub-menu.
Now it looks like I want it to. Many thanks AGAIN!!!!
You’re welcome 🙂
The topic ‘Remove Left Margin in Sub-Menu’ is closed to new replies.
