PDA

View Full Version : internet explorer CSS bug?


whackaxe
12-10-2003, 07:15 PM
after a long lapse of inactivity, i've finaly found website work! (got 3 clients actually, all at same time)

problem i have is a div that has a background image an dis supposed to be 14px high. displays fine in mozzila but in IE it adds on a few pixels to the bottom. does anyone know about this bug and how to solve it? cheers all :)

Skyzyx
12-10-2003, 09:50 PM
Y'know, I recently came across a similar problem... except that I was using the Langridge Image Replacement Technique. I posted a lot of code bits in one of my recent posts. Maybe some of it can help you.

http://www.skyzyx.com/archives/000123.php

Aside from that, I must ask:

1) Are you using IE6?

2) Do you have a valid, non-quirk DOCTYPE declared?

If either of those is no, I'd suggest doing both of them. After that, I'd suggest using one of the CSS box model hacks listed here:

http://www.skyzyx.com/resources/#csshacks

These should take care of some of your issues. Let me know if they don't. Hope this helps!

whackaxe
12-11-2003, 02:58 PM
thanx for the info. i am using IE6 and this doctype
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

i have just found a hack for ie 6 (and 800*600 screens im not shure that it will work with other resolutions). i tried typeing some text into my div and suprise suprise, its just the height ( padding) of my div so i changed the font-size to 12px; and its the right height :s is there any reason it would size the div for text when there isnt any?

me'
12-11-2003, 05:15 PM
You'll want to swap that out for a strict doctype, IE will behave better. If you've met one before, it looks like this:

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