views:

1200

answers:

3

Hello all,

I'm currently having problems with Internet Explorer 8 ignoring padding/line-heights that I have on a list which includes a check box.

To start off here is my CSS and XHTML markup here, the issue occurs with the list element which includes Private.

At the moment Firefox 3, Internet Explorer 7, Safari 3, Google Chrome renders this list perfectly, screenshot here. But this is how Internet Explorer 8 renders the list, screenshot here.

Can anyone suggest a method to fix this issue?

Thanks in advance!

A: 

I was also once having some problems with IE8. So, I declared a different doctype and it worked!!

Currently, you are suing xhtml transitional.

Try this:(ok, edited)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;

read more about doctypes and how can they fix sites here: A list apart-Fix your site with right doctype

Learner
+1 it's picky about this too
T. Stone
This fixed it but broke the rest of my site :/Is there any ideas to why this is occuring CSS wise?
schone
Well it should really be XHTML 1.0 Strict, since you're using XHTML syntax not HTML4. Either way, Strict/Transitional normally switches between full Standards and “Almost Standards” mode; there is not usually much difference. The curious thing is that your transitional doctype should have left you in Almost Standards mode, which is closer to what IE7 did than full Standards.
bobince
Setting it back to strict fixed it! Thanks!
schone
Most welcome :)
Learner
A: 

My limited experience with IE8 so far has been that it's very picky about proper markup. Accordingly, you've got a close tag with no corresponding head. Check that out and see if it helps.

http://validator.w3.org/check?uri=http%3A%2F%2Fwww.users.on.net%2F~prashyanthy%2Ftext.html&amp;charset=%28detect+automatically%29&amp;doctype=Inline&amp;group=0

T. Stone
Fixing this made no changes to the issue.
schone
A: 

It seems that in IE (and Opera as it happens) the checkbox doesn't participate in the inline content of the li, so, since the label doesn't either because it's floated, the line-height setting for the li has no effect.

Add a &nbsp; after the label in the checkbox line, and that will be sufficient for the line-height to take effect, and all the li s will be the same height.

Alohci