views:

308

answers:

2

IE6 and 7 seem to like to push the list left, and cut off the numbers at www.qwibbledesigns.co.uk/preview/aurelius/about.html , near the bottom. Does anyone know whats going on?

+2  A: 

I believe the default CSS for lists in IE is a left margin of 40px, whereas other browsers use padding (as per a w3c "suggestion"). Most likely you've reset the margin but not the padding. I'd suggest applying CSS similar to this:

ul {
  margin: 0;
  padding: 0 0 0 40px;
}
DisgruntledGoat
I didnt expect it to work as my reset already defined both padding and margin as 0, but with a bit of tinkering ' ol { padding: 0 0 0 5px;}', it worked. Cheers buddy =)
Qwibble
A: 

If the suggestion of DisgrutnledGoat works: you know about the IE hack to make sure the css definition only aplies on IE (and not an Firefox and the rest )?

Use

* html ul {
  ...
}

Thus the '* html' prefix to make only IE 'understand' the definition.

Sorry, if I'm stating a common knowledge item here.

Edelcom
It's a *far* better idea to use a conditional comment than to rely on obscure parsing bugs that have no relation to the actual problem. You don't know if there'll suddenly get a bug in FF 5.21 that causes this to be understood - even if it shouldn't be - but by using a conditional comment, you can accurately target the specific IE versions you're after.
Michael Madsen
@Michael: You don't know if there'll suddenly be a bug in FF 5.21 that parses IE conditional comments as regular code :p Though I do agree about targeting specific versions of IE. The `* html` may work in IE8 but you probably don't want to target it.
DisgruntledGoat
I agree it's not the best thing to do. But if you consider bugs: any bug in any program can make whatever you do useless. If suddenly the condition comments are not parsed correctly, many sites will have a problem too. And to be honest: the use of contitional comments where comments suddenly become meaningfull feel wrong too.
Edelcom