Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
Like Tree1Likes
  • 1 Post By TheGAME1264

Thread: Trouble spreading the color to the edges of page

  1. #1
    Junior Member
    Join Date
    Jan 2014
    Posts
    2
    Member #
    38254

    Question Trouble spreading the color to the edges of page

    How do i get the color to go from 1 edge of the page (browser window) to another. For e.g this site here:
    http://1.bp.blogspot.com/_bVtGlUaW-t.../s1600/m17.jpg

    Even though the content is in a container and is centered horizontally there the thick black row going across doesnt stop there. Instead it goes all the edge of the browser window. How can achieve this?

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    width: 100%; in your CSS.
    danedillon likes this.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  4. #3
    Member djitsz's Avatar
    Join Date
    Jan 2014
    Posts
    67
    Member #
    38199
    Liked
    17 times
    Hi Danedillon,

    Try something like this:

    HTML:
    <div class="header">
    <div class="container">
    Header content
    </div>
    </div>
    <div class="navigation">
    <div class="container>
    Navigation content
    </div>
    </div>
    <div class="body">
    <div class="container">
    Main content
    </div>
    </div>
    CSS:
    .container {
    width: 960px; /*Or whatever your page width is*/
    margin: 0 auto;
    }
    .header {
    background-color: red;
    }
    .navigation {
    background-color: green;
    }
    .body {
    background-color: blue;
    }
    The outer divs cover the full width of your browser window and the inner .container divs center the content within these outer divs.

    Best wishes
    Jitse


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:17 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com