SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict Procode's Avatar
    Join Date
    Dec 2006
    Location
    New York
    Posts
    371
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Stretching the background with the 960 grid system?

    Basically the problem I am having is I set a background color to the div's but there is white spacing on the top left and right sides. The question is how do I correctly remove these white spaces? Here is my code (I am using the 960 grid system):

    Code HTML4Strict:
     <div id="logo">
        <div class="container_12">
            <div class="grid_12">
                Header and logo
            </div>
        </div>
        <div class="clear"></div>
    </div>
     
    <div id="main">
        <div class="container_12">
            <div class="grid_12">
                <div class="grid_6 alpha">Header text</div>
                <div class="grid_1"></div>
                <div class="grid_5 omega">Button</div>
            </div>
        </div>
                <div class="clear"></div>
    </div>
    And my css is:

    Code CSS:
    div#logo {
    height: 175px;
    background-color: #083d5e;
     
    }
     
    div#main {
    height: 205px;
    background-color: #01070b;
    }
    Thanks in advance!

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,112
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    It might be just the default margins on the body element. Try adding this to your style sheet:

    Code:
    html, body, div, h1, h2, h3, h4, h5, h6, p, a, blockquote, pre, code, hr, img, form, fieldset, legend, label, textarea, span, em, strong, sub, sup, cite, table, tbody, td, tfoot, th, thead, tr, tt, dl, dt, dd, ol, ul, li {margin: 0; padding: 0;}
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."


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
  •