Welcome to WebmasterWorld Guest from 54.234.114.182

Forum Moderators: incrediBILL

Message Too Old, No Replies

DIVs and Firefox/IE

     

Drimacus

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

Inactive Member
Account Expired

 
 


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 June 13, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Nov 13, 2002
posts:818
votes: 0


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 June 13, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:June 9, 2005
posts:190
votes: 0


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

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

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Nov 13, 2002
posts:818
votes: 0


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