Forum Moderators: not2easy

Message Too Old, No Replies

Setting rollover height?

only allows width changes

         

buksida

7:58 am on Oct 22, 2004 (gmt 0)

10+ Year Member



Have made some rollovers in CSS but I cant set the height of them in this code:

#navlist
{
padding: 0 1px 1px;
margin-left: 0;
font: 10px Arial;
width: 10.5em;
}

#navlist li
{
list-style: none;
margin: 0;
border-top: 1px solid #000;
text-align: left;
}
#navlist li a
{
display: block;
padding: 0.25em 0.25em 0.25em 0.25em;
border-left: 0.5em solid #365086;
background: #A7C7FE;
text-decoration: none;
}

#navlist li a:link { color: #000; }
#navlist li a:visited { color: #000; }

#navlist li a:hover
{
border-color: #FFF;
color: #FFFFFF;
background: #365086;
}

The height changes when the font size changes but I dont want to make it any smaller. Any thing else I try gets ignored, any suggestions?

photon

1:43 pm on Oct 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Where are you trying to set the height? In
#navlist li a
?

buksida

9:01 am on Oct 25, 2004 (gmt 0)

10+ Year Member



yeh, its a menu, I want each box to be slightly thinner than they are at default.

have tried "height:" but it gets ignored

DrDoc

5:09 pm on Oct 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Height will only be applied if it's a block level element.

buksida

8:42 am on Oct 26, 2004 (gmt 0)

10+ Year Member



So do I need to add

display: block;

into the #navlist bit?

hmmmm that didnt work either.

buksida

9:51 am on Oct 26, 2004 (gmt 0)

10+ Year Member



Okay got the desired effect now by fiddling with this:

padding: 0.25em 0.25em 0.25em 0.25em;