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
    Member #

    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:

    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?


  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Not from USA
    Member #
    2784 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
    Member #
    17 times
    Hi Danedillon,

    Try something like this:

    <div class="header">
    <div class="container">
    Header content
    <div class="navigation">
    <div class="container>
    Navigation content
    <div class="body">
    <div class="container">
    Main content
    .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

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 03:22 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: