Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS FireFox Margin Bug

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #24043
    savage
    Member

    I’ve been searching around for an answer but have yet to find one, so I was hoping someone here could help. This problem only exists in Firefox, I’ve tested in Safari (osx), Firefox (osx), and IE6 (pc).

    When I try to apply a bottom-margin: 10px; to my navigation wrapper (in order to separate it from the content below) BOTH the navigation AND the content wrapper get the margin style applied in FireFox. In Safari and IE6 it works – I figured it would totally break in IE6 but it doesn’t.

    HTML:

    Code:




    firefox margin bug

    HELLO?


    CSS

    Code:
    body {
    margin: 0 0 0 0;
    padding: 0 0 0 0;
    font-family: arial, helvetica, sans-serif;
    font-size: 11px;
    font-color: #272727;
    line-height: 16px;
    background:url(../images/01backgrad.png) repeat-x top;
    background-color: #0D344F;
    }

    .clearContent{clear:both;}

    #wrapper {
    margin: 0px auto;
    padding: 0 0 0 0;
    border: 0px solid #272727;
    width: 1024px;
    background: url(../images/02shadow.png) no-repeat top;
    }

    #container {
    margin: 0px auto 0px auto;
    width: 900px;
    }

    /* NAVIGATION STYLES */

    #navigation {
    margin: 0 0 10px 0;
    padding: 0 0 0 0;
    width: 900px;
    background-color: #990000;
    }

    #mainNav {
    margin: 0 0 0 0;
    padding: 0 0 0 0;
    float:left;
    width: 796px;}

    #mainNav ul {
    margin: 0;
    padding: 0;
    list-style-type:none;
    }

    #mainNav li {
    margin: 0 0 0 0;
    padding: 0 10px 0 0;
    float:left;
    color:#FFFFFF;}

    any suggestions or help would be greatly appreciated.
    thanks.

    #53521
    savage
    Member

    okay. here’s a URL http://savagecorp.com/firefox/firefoxtest.html that you can test off of.

    I cleaned up the CSS a bit, as requested.

    I knew the "border: 0px solid #272727;" will have no border, but i was using that to test; this is also why there were two clears… so i took one out.

    * The only way past this that I have discovered is to make a 10px high div with nothing in it.
    It’s not something I really want to do, but after 2 hours of nothing, it’s all I got.

    * Could this have anything to do with DocType ?

    #53582
    savage
    Member

    exactly! this is mind boggling !!

    #53567
    savage
    Member

    setting the containing DIV’s to a position of Relative fixed the problem.

    #53571
    Ramesh
    Member

    simply float the navigation div to left

    #59170

    Set the padding of the div to 0.01px;
    padding:0.01px;

    [bows] Thankyou, thankyou… :)

    #131148
    Maya_RS
    Member

    >>SAVAGE
    Extra idea! Thank you so much :)

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘CSS’ is closed to new topics and replies.