Setting height of <li>

Associate
Joined
25 Feb 2007
Posts
905
Location
Midlands
Hi,

I have a menu-bar div which contains a ul with 4 li's inside it.

The height of the div is 100px and has a gradient background image applied.

I want to make the height of the li's the same as the height of the div, so I can have borders going to to bottom. At the moment, the height of the li is only as big as the text, and won't change regardless of where i attach height: 100px;

Any advice?
 
The best thing to do is display: block your 'ul li a' and then set height on it (or padding even). That way the whole block will be clickable. You'd also be able to change border and/or background color on hover.
 
This sorts the height issue, but now my buttons appear below each other (I have display: inline applied to the ul li tag), how do I fix this?

Cheers for the speedy reply by the way!
 
Back
Top Bottom