|
BonRouge -> RE: fixed width list (4/23/2006 3:33:03)
|
I think the problem you are/were having is the fact that inline elements do not have width - block-level elements do. You're taking a naturally block-level element and making it inline, so the width value is disregarded. IE gives it a width because it's stupid and doesn't know the rules. I'm sure you've sorted it out now by looking at Listamatic, but if you want a horizontal menu with fixed with list items, you need to float them. The funny thing is if you do this and you put a margin on the li elements, you'll need to add 'display:inline;' to your li rules due to an IE bug. Good browsers will ignore that rule, as floated elements are, by nature, kind of block-level. Without it, IE will double the margin that you set, because it's a bit insane like that. For some reason, which God only knows (or maybe just one of the IE developers...), adding the 'display:inline;' kills that bug. As far as making the whole of the li change colour on hover goes, you'll need to set the 'a' tag to 'display:block;'. Even doing this might not be enough for IE6, which is riddled with bugs. Tons of them, there are. IE has this great little feature called hasLayout which is the cause of masses of rendering problems and the source of the famous 'holly hack' (* html). I think, with IE7 coming up, it may be best to put the extra rule in IE conditional comments: the extra code being something to trigger hasLayout, for example... li a {
zoom:1;
} It's not standard, but neither are conditional comments. Neither of these will cause any problem with the W3C validator, however, and it should fix that problem. I hope this has helped.
|
|
|
|