Firefox left-marin problem

Reply

Join Date: Jul 2005
Posts: 18
Reputation: arrbug is an unknown quantity at this point 
Solved Threads: 0
arrbug arrbug is offline Offline
Newbie Poster

Firefox left-marin problem

 
0
  #1
Sep 13th, 2007
I´m trying to figure out why the left margin of: http://www.cis-elsalvador.org/temp/e...ry_mission.php
displays differentlyin Firefox from the left margin of:
http://www.cis-elsalvador.org/temp/e...ria_mision.php

even though they share the same stylesheet and, as far as I can tell, the exact same HTML.
I had a similar problem with other pages because certain text elements did not have their margin and padding defined as 0, but these don´t have any HTML tags that are different from each other. Thanks!


Here´s the layout stylesheet:

HTML and CSS Syntax (Toggle Plain Text)
  1. body {
  2. margin : auto ;
  3. padding : 0px ;
  4. background: #CCCC99;
  5. }
  6.  
  7. #wrapper {
  8. width : 778px ;
  9. margin : 0px auto;
  10. padding: 0;
  11. }
  12.  
  13. #header {
  14. text-align : left;
  15. width: 778px;
  16. }
  17.  
  18. #leftmenu {
  19. float : left ;
  20. width : 200px ;
  21. }
  22.  
  23. #content {
  24. float : left;
  25. width : 578px ;
  26. }
  27.  
  28. #footer {
  29. clear : both ;
  30. text-align : right;
  31. }
  32.  
  33. .print_hidden
  34. {
  35. display: none;
  36. }
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 8
Reputation: cmannering is an unknown quantity at this point 
Solved Threads: 1
cmannering's Avatar
cmannering cmannering is offline Offline
Newbie Poster

Re: Firefox left-marin problem

 
0
  #2
Sep 13th, 2007
Maybe try setting the body margin and padding both to 0 to override the predefined attributes across browsers.

And also make sure you handle the overflow of floats, overflow:hidden on the parent/container of the floats should keep them all in order.

Though sometimes fiddling with the DOC type will fix your problems. Have you tried validating yet?
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 3,210
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: Firefox left-marin problem

 
0
  #3
Sep 13th, 2007
They look the same to me, on FF 2.0.0.6.

Maybe it's the difference between how FF and IE handle margins, borders, and padding:

FF puts them outside the measured position and size of a block item.

IE puts them inside the measured position and size of a block item.
Last edited by MidiMagic; Sep 13th, 2007 at 5:06 pm.
Daylight-saving time uses more gasoline
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 18
Reputation: arrbug is an unknown quantity at this point 
Solved Threads: 0
arrbug arrbug is offline Offline
Newbie Poster

Re: Firefox left-marin problem

 
0
  #4
Sep 14th, 2007
Oh wait. I thought I had fixed it ... setting overflow: hidden on the body fixed it, but then of course you can´t scroll. I think, however, that I now see the problem ..............

Any time the page has vertical overflow, it pushes the left margin over to the left a few pixels.


Setting the body to overflow: scroll fixes it in firefox, but then it causes problems in internet explorer....

Any more suggestions?
Last edited by arrbug; Sep 14th, 2007 at 12:08 pm. Reason: problem not fixed after all
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 18
Reputation: arrbug is an unknown quantity at this point 
Solved Threads: 0
arrbug arrbug is offline Offline
Newbie Poster

Re: Firefox left-marin problem

 
0
  #5
Sep 14th, 2007
Originally Posted by MidiMagic View Post
They look the same to me, on FF 2.0.0.6.

Maybe it's the difference between how FF and IE handle margins, borders, and padding:

FF puts them outside the measured position and size of a block item.

IE puts them inside the measured position and size of a block item.

I have the same version of firefox. Two friends who looked at it also have the same version -- but one saw the problem and one didn´t. Strange. In any event, thanks for your help!
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 18
Reputation: arrbug is an unknown quantity at this point 
Solved Threads: 0
arrbug arrbug is offline Offline
Newbie Poster

Re: Firefox left-marin problem

 
0
  #6
Sep 14th, 2007
Originally Posted by cmannering View Post
Maybe try setting the body margin and padding both to 0 to override the predefined attributes across browsers.

And also make sure you handle the overflow of floats, overflow:hidden on the parent/container of the floats should keep them all in order.

Though sometimes fiddling with the DOC type will fix your problems. Have you tried validating yet?
Page does validate.
Since it was a problem with the overflow (see post below) I tried setting the min-height of the body for a quick fix. Do you see any problem with this? (I.e., what about safari and opera?)

Even if I.e. doesn´t display min-height well, it seems to be working in both browsers now, even if the fix isn´t ideal.

This also explains why people using the same browsers saw it display differently --- depending on the height of their window, and whether there was vertical overflow or not.

Any other suggestions?
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 3,210
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: Firefox left-marin problem

 
0
  #7
Sep 18th, 2007
If the page won't validate, anything can happen.
Daylight-saving time uses more gasoline
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 18
Reputation: arrbug is an unknown quantity at this point 
Solved Threads: 0
arrbug arrbug is offline Offline
Newbie Poster

Re: Firefox left-marin problem

 
0
  #8
Sep 18th, 2007
Originally Posted by MidiMagic View Post
If the page won't validate, anything can happen.
Page does validate as XHTML 1.0 Transitional.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the HTML and CSS Forum
Thread Tools Search this Thread



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

©2003 - 2009 DaniWeb® LLC