Jump to content
Sign in to follow this  
kerremans

Main nav full width and auto padding

Recommended Posts

kerremans

Hi, I have removed the search box from my main nav but the menu does not always spread out over the full width. Is there any way to do this with the padding adjusting itself? I have added this css: .main-nav a{padding-left:40px !important;padding-right:40px !important;} This works okay but not on all browsers and when I add a menu item I have to change the parameters again. Isn't there a way I can make the menu 100% so it changes the padding itself? My site is ontneming.nu.

Share this post


Link to post
Share on other sites
kastelic
No, you can't make child elements calculate their own width to make their parent a certain size in CSS. You will have to adjust manually.

Share this post


Link to post
Share on other sites
Rob
Actually, Kastelic is correct. You cannot achieve that goal as you describe it.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
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

Sign in to follow this  

×