Hope this helps...

liunx

Guest
One thing that you have to bear in mind (don't know though if it will actually help you):

setting padding (right + left) values on IE and 100% width doesn't affect the 100% width whatsoever.

Doing the same thing though in Mozilla causes the padding values to be added to the overall width, thus making it > 100%...


Hope this helps to avoid problems in the future....;)There is an easy workaround for that however. You can take advantage of other IE bugs to feed it the wrong value while still alowing the correct use of padding for browsers like Mozilla.

Here is also examples of how to work around bugs in Opera 3-5, 6, 7b and IE/Mac

div.myDiv{
color: black; /* Used by IE5/win & IE5.5/win */
voice-family: "\"}\""; voice-family:inherit;
color: blue; /* Used by IE6/win */
}

html>body div.myDiv {
color: red; /* Used by Opera 3-5 */
c\olor: lime; /* Used by Opera 6 (any letter G-Z can be escaped with a backslash in CSS) */
}

head:first-child+body div.myDiv {
color: green; /* Used by Opera 7beta & IE5/Mac */
}

html[xmlns] div.myDiv {
color: purple; /* Used by Gecko when XHTML sent as text/html */
}

The above examples should be interpreted as:
a specific browser will understand the rules before it's mentioned and also all the rules above it in the list.

Thus eg html[xmlns] div.myDiv for Mozilla is only needed for when you need to work around a bug in eg Opera 7beta.
To work around an IE/Win bug you just use div.myDiv to feed IE the wrong values and then html>body div.myDiv to provide the (theoretically) correct CSS to basicly all other browsers.
 
Back
Top