Chrome not reading style correct

Thread Solved

Join Date: Mar 2009
Posts: 77
Reputation: mj080 is an unknown quantity at this point 
Solved Threads: 5
mj080's Avatar
mj080 mj080 is offline Offline
Junior Poster in Training

Chrome not reading style correct

 
0
  #1
Sep 22nd, 2009
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

HTML and CSS Syntax (Toggle Plain Text)
  1. .navigation{
  2. font-size:70%;
  3. font-family:Verdana, Arial, Helvetica, sans-serif;
  4. font-weight:bold;
  5. background-image:url(../images/NavigationSlice.jpg);
  6. background-repeat: repeat-x;
  7. background-color:#ffffff;
  8. width: 101.3%;
  9. height:40px;
  10. margin-left:-5px;
  11. }

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!!
Last edited by mj080; Sep 22nd, 2009 at 10:47 am.
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 348
Reputation: Troy III will become famous soon enough Troy III will become famous soon enough 
Solved Threads: 42
Troy III's Avatar
Troy III Troy III is offline Offline
Posting Whiz

Re: Chrome not reading style correct

 
0
  #2
Sep 22nd, 2009
Perahaps its a BUG!
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 6
Reputation: prateeksha is an unknown quantity at this point 
Solved Threads: 1
prateeksha prateeksha is offline Offline
Newbie Poster

Re: Chrome not reading style correct

 
0
  #3
Sep 22nd, 2009
Hi

Maybe that style is modified later on...

try

margin-left:-5px !important;
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 77
Reputation: mj080 is an unknown quantity at this point 
Solved Threads: 5
mj080's Avatar
mj080 mj080 is offline Offline
Junior Poster in Training

Re: Chrome not reading style correct

 
0
  #4
Sep 23rd, 2009
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...
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 348
Reputation: Troy III will become famous soon enough Troy III will become famous soon enough 
Solved Threads: 42
Troy III's Avatar
Troy III Troy III is offline Offline
Posting Whiz

Re: Chrome not reading style correct

 
0
  #5
Sep 23rd, 2009
meaning: cripled Chrome doesn't support negative margins.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 3,203
Reputation: MidiMagic has a spectacular aura about MidiMagic has a spectacular aura about 
Solved Threads: 164
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Nearly a Senior Poster

Re: Chrome not reading style correct

 
0
  #6
Sep 26th, 2009
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.
Daylight-saving time uses more gasoline
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 348
Reputation: Troy III will become famous soon enough Troy III will become famous soon enough 
Solved Threads: 42
Troy III's Avatar
Troy III Troy III is offline Offline
Posting Whiz

Re: Chrome not reading style correct

 
0
  #7
Sep 26th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 77
Reputation: mj080 is an unknown quantity at this point 
Solved Threads: 5
mj080's Avatar
mj080 mj080 is offline Offline
Junior Poster in Training

Re: Chrome not reading style correct

 
0
  #8
Sep 28th, 2009
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!
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 348
Reputation: Troy III will become famous soon enough Troy III will become famous soon enough 
Solved Threads: 42
Troy III's Avatar
Troy III Troy III is offline Offline
Posting Whiz

Re: Chrome not reading style correct

 
0
  #9
Sep 28th, 2009
Originally Posted by mj080 View Post
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.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC