homepage Welcome to WebmasterWorld Guest from 54.227.67.210
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderator: open

CSS Forum

    
Padding problem between IE and Mozilla
padding problem between IE and Mozilla
tomhouy




msg:1201632
 8:27 pm on May 8, 2003 (gmt 0)

I apologize if this has been explained before but I'm a little new to the specifics of CSS.

I created a style that is 150px wide with 10px of padding all around, and the background color is Red.

When I view it in Internet Explorer, the red box is exactly 150 pixels wide. When I view it in Mozilla, the red box is 170 pixels wide.

What is causing this?

 

SuzyUK




msg:1201633
 9:02 pm on May 8, 2003 (gmt 0)

Hello tomhouy...Welcome to Webmasterworld [webmasterworld.com]

You have encountered the infamous IE Box Model problem.. IE is wrong Moz is correct

the specifics take a bit of time to understand...but it's been explained in this post [webmasterworld.com] and there are various workarounds discussed there too....

Suzy

DrDoc




msg:1201634
 9:03 pm on May 8, 2003 (gmt 0)

This only affects IE5.5 for Windows... The truth is, IE is wrong - all other browsers are right.

For more information about how height and width works, consult this thread [webmasterworld.com] (message 38)

tomhouy




msg:1201635
 1:27 am on May 9, 2003 (gmt 0)

Thank you all for your help! This has been driving me nuts. I have a couple books on CSS but never really understood what that box model hack was until reading this site. :)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved