Welcome to WebmasterWorld Guest from

Forum Moderators: incrediBILL

Message Too Old, No Replies

DIVs and Firefox/IE



12:57 pm on Jun 13, 2005 (gmt 0)

Hi there,

i'm sure there are other threads about this, but i can't find one right now.

How can i have a div with the exactly same px at firefox and IE? I know that Firefoxs includes the border and IE doesn't (at given width/height).

Is there a command that would ignored by IE? so that i can tell FF the correct width? (well, i know IE does the mistake, but just to fix my problem ;))

thanks in advance!


6:48 pm on Jun 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

If you do a search on the "box model hack" you'll find tons of information.

Are you declaring a DOCTYPE for your web pages? For example:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">


7:21 pm on Jun 13, 2005 (gmt 0)

10+ Year Member

The box model discrepancy only applies to IE 5.x, not 6.

You can find a solution at: [tantek.com...]


12:48 pm on Jun 14, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

IE6 does it correctly only if there is a complete DOCTYPE declared. Otherwise, it has the same issues as IE5.x.

Featured Threads

Hot Threads This Week

Hot Threads This Month