SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member ordinarygal83's Avatar
    Join Date
    Jul 2006
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question css margin problems

    Hi, this is my first time using div layers and I'm having trouble with the margins in Firefox. What I'm trying to do is have two borders, one white, then another blue around the middle column and right column of the page. So far, everything except that the left margin is smaller than the right margin in firefox but it works fine in IE.

    this is my code:

    #left {
    float:left;
    width:22%;
    background-image: url(img/bgcolor1.gif);
    background-repeat: repeat;
    height:300px;
    margin: 0px;
    padding: 20px 0 0 0;
    }

    #main {
    position:relative;
    margin:0;
    background-image: url(img/bgcolor1.gif);
    background-repeat: repeat-x;
    height:750px;
    }

    #right {
    float:right;
    width:22%;
    height:730px;
    margin-top: 10px;
    margin-bottom: 10px;
    margin-right:10px;
    margin-left:3px;
    padding: 0px;
    border: 1px solid #FFFFFF;
    }

    #rightblueborder {
    float:right;
    width:98%;
    height:724px;
    margin-top: 2px;
    margin-bottom: 2px;
    margin-right:1px;
    margin-left:1px;
    padding: 0px;
    border: 1px solid #3184C1;
    }

    #rightbody {
    width: 98%;
    float: right;
    padding:0px;
    color: #000000;
    height: 718px;
    background: #FFFFFF;
    position: relative;
    margin-top: 2px;
    margin-bottom: 2px;
    margin-right:1px;
    margin-left:1px;
    }

    #content {
    float: left;
    width:50%;
    height:730px;
    margin-top: 10px;
    margin-bottom: 10px;
    margin-right:5px;
    margin-left:5px;
    border: 1px solid #FFFFFF;
    }

    #contentblueborder {
    float: left;
    width: 98%;
    height:724px;
    margin-bottom: 2px;
    margin-top: 2px;
    margin-right: 1px;
    margin-left: 2px;
    padding: 0px;
    border: 1px solid #3184C1;
    }

    #contentbody {
    width: auto;
    float: left;
    padding:0;
    color: #000000;
    height: 718px;
    background: #FFFFFF;
    position: relative;
    margin-bottom: 2px;
    margin-top: 2px;
    margin-right: 1px;
    margin-left: 1px;
    }

    html:
    <div id="main">
    <div id="left"> </div>
    <div id="content">
    <div id="contentblueborder">
    <div id="contentbody">
    this is where the body goes
    </div>
    </div>

    <div id="right">
    <div id="rightblueborder">
    <div id="rightbody">
    this is where the right column goes
    </div>
    </div>
    </div>

    </div>

    Any help would be greatly apreciated!

    Thanks!

  2. #2
    SitePoint Member ordinarygal83's Avatar
    Join Date
    Jul 2006
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi, thanks a lot for your help! This works great and the css is also much cleaner than mine! Can you explain what these are for?

    head+/**/body .fc:after{
    content:".";
    display:block;
    height:0px;
    clear:both;
    visibility:hidden;
    }

    * html .fc{height:1%;}

    <!--[if IE]>
    <style type="text/css">
    *+html .fc{zoom:1;}
    </style>
    <![endif]-->

  3. #3
    SitePoint Member ordinarygal83's Avatar
    Join Date
    Jul 2006
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for the links!

  4. #4
    SitePoint Enthusiast jeffrey.pry's Avatar
    Join Date
    Oct 2006
    Location
    United States of America
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice link!
    -----------------
    Jeffrey Kevin Pry


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •