Simple css question regarding padding
Im having some problems with my css on: http://johan开发者_StackOverflow中文版berntsson.se/dev/fysiosteo/
Since some menu items have longer names, they get a new row, which result in lack of padding at the bottom. Is there any way to make all menu items get the same padding bot, regardless of if theres a new line or not? Or do i have to solve this with jquery? Thanks
Remove min-height and set a bottom padding different than 0px on style.css line 89.
This will obviously not give you menu items of the same height.
In your CSS you have
#menu-main-menu li a { padding: 10px 5px 0 5px }
You you are setting your padding bottom to 0 which obviously gives you no padding at the bottom, duh.
Make these changes in your style sheet
#menu-main-menu li a { padding: 10px 5px 5px 5px; }
.nav { height: 41px; }
Rather then using the height of the box to create the padding, you could make the min-height of the box smaller (to say 20px) and add 6px padding to the bottom to ensure you always have padding at the bottom of a navigation item.
精彩评论