Forum Moderators: not2easy

Message Too Old, No Replies

Multicoloured background's in rollover menu

and how to acheive it with lists?

         

20footduck

12:32 pm on May 11, 2006 (gmt 0)

10+ Year Member



Hi there

Am sure there's something obvious i'm missing here but i'm having problems (in ie) using a class selector to define the colour of the background in a particular menu item...

ok so if you view the code here:
[chrisslowe.uklinux.net...]
you can see the menu in the top right works fine in Safari and Firefox but IE6 ignores both display:inline and the rollover effect.

Here is the relevant css...


ul#menu {
font-size:
10pt; font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: normal;
list-style-type: none;
margin: 0 0 0 0;
padding-top: 0;
padding-bottom: 0;
padding-left: 0;
width: 200px;
border: solid 1px black
}

ul#menu li a {
color: black;
font-weight: bold;
text-decoration: none;
background-color: inherit;
display: block;
padding-top: 5px;
padding-bottom: 5px;
padding-left: 60px
}

ul#menu li {
display: inline
}

ul#menu li a:hover {
color: black;
background-color: white
}

li.yellow {
background-color: #ebeb4d;
display: inline
}

with the last selector I've tries "ul#menu li.yellow" and just ".yellow". also it makes no difference at all whether or not you have 'display:inline' in there or not.

so in summary i want the menu to work in exactly the same way in ie as it does in firefox and safari... (same old same old)

any ideas?
thanks,
Chris

20footduck

1:23 pm on May 11, 2006 (gmt 0)

10+ Year Member



riiiight I got it. sorry about that- it needed to have display:block in the 'ul#menu li.yellow' selector...

thanks anyway,
c