0

i have two seperate style sheets. one that needs to read FF and Chrome and a seperate style sheet for IE (conditional commenting) to fix all the bugs that IE has, but i now have a problem with Chrome not reading ONE style correct.

it's not reading my margin on the style for my navigation, and i have even tried addign -khtml- every where in the style to see if it might read it....

style

.navigation{
	font-size:70%;
	font-family:Verdana, Arial, Helvetica, sans-serif;
	font-weight:bold;
	background-image:url(../images/NavigationSlice.jpg);
	background-repeat: repeat-x;
	background-color:#ffffff; 
	width: 101.3%;
	height:40px;
	margin-left:-5px;
}

not sure if i should rather paste my whole code for you to see??
but if you have experienced this problem before, and know a solution, your help would be much appreciated!! :)

Edited by MJ Pieterse: n/a

4
Contributors
8
Replies
9
Views
7 Years
Discussion Span
Last Post by Troy III
0

awe, still no luck. the only change that made was to make sure that IE reads that and doesn't change it when it reads the conditional comments page.

.:Why oh Why:.

thanks for your help, maybe i should just try something different...
have looked at everything and there doesn't seem to be a problem anywhere...

0

Negative numbers are not part of the W3C definition for margin. Browsers go into quirks mode when they encounter them.

Note that it is NOT necessary to make a separate style sheet for IE. I have been able to make web pages that render the same for all browsers. The trick is to not put size styles (width and height) and surrounding styles (margin, border, padding) on the same tag. Also, do not use anything that throws the browser into quirks mode, and do not use nonstandard extensions provided by some browsers.

0

It is possible that you've confused margins with padding specifications since negative padding is not allowed and people us padding to achieve similar effect quite often and may confuse them. But negative margins are allowed and defined by W3C:

css2.1 box model http://www.w3.org/TR/CSS2/box.html
also defined and supported in CSS1
CSS1 box model http://www.w3.org/TR/REC-CSS1
definition sample
In the case of negative margins, the absolute maximum of the negative adjoining margins is deducted from the maximum of the positive adjoining margins. If there are no positive margins, the absolute maximum of the negative adjoining margins is deducted from zero.

0

i'm not sure why it's doing that, because my IE is reading it correctly (without adding any negative margin) but i have to add the negative margin in order for FF to read it correctly. I'll just have to trail and error until something is fixed.

thanks so much for your responses!

0

i'm not sure why it's doing that, because my IE is reading it correctly (without adding any negative margin) but i have to add the negative margin in order for FF to read it correctly. I'll just have to trail and error until something is fixed.

thanks so much for your responses!

Can I see your code - It may be possible to fix it for all with one style sheet only.

Do you have it online?

Or can you post (copy- paste [exactly as is]) the HTML code of the, element preceding together with the code of element succeeding the problematic code to make sure it's not one of them profane browser mistakes not handling white-space as expected.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.