Welcome Guest [Log In] [Register]
Viewing Single Post From: Browser Dependent CSS
Zeerus
Member Avatar
Spank My Monkey!
[ *  *  *  *  *  * ]
it's called the Box Model hack, by Tantek Celik
basically, IE ignores anything that comes after a backslash, like comments. But it also ignores open slashes. Basically with the box model we have two types of browsers. Whenever you create a div in IE, the padding, border width, etc. is counted inside the total defined Width of the DIV

in most all other browser leements the div element is always the specifed width, and borders and padding are added to the outside of the DIV. let me give you an example

Quote:
 
IE:
DIV element + 2px border + 10px padding = defined width



Quote:
 
FF, Opera, Netscape, Etc.:
DIV element + 2px border + 10px padding = defined width + 2px border + 10px padding


to wrap it up, IE only sees the width of 749px, with the 20px of padding or whatever contained inside that. FF and other browsers only see the width of 729px, with the 20 px of padding or whatever added to the outside of that. This ensures that the measuremeants are the same in both browsers, and they both add up to 749px using their own measurement system.

with my method of using browser dependant stylsheets you don't have to use any hacks.
Posted Image
Offline Profile Quote Post
Browser Dependent CSS · Tutorials