SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Jan 2014
    Location
    Surrey, British Columbia Canada
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Different Backgrounds for Sections

    Hi,

    What is the best way to have the content of sections be 960px and he background to be 100%. For instance if I have header, content, featured and footer and I want the content to be 960 but the backgrounds to all be different colours that span the entire width of the browser how would I do that. I tried to have an outer and inner div but it does not work. Thanks for any hints you may have on how this is accomplished in CSS and HTML.

  2. #2
    SitePoint Wizard webcosmo's Avatar
    Join Date
    Oct 2007
    Location
    Boston, MA
    Posts
    1,480
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    You would apply the background to the BODY of the page.

  3. #3
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,177
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by GHgayle2014 View Post
    I tried to have an outer and inner div but it does not work.
    Yes it does. That's the way to do it, so perhaps the structure wasn't quite right. Have a look at this page layout for an example fo how to structure the outer and inner divs: http://pageaffairs.com/repo/full-wid...d-columns.html

  4. #4
    SitePoint Member
    Join Date
    Jan 2014
    Location
    Surrey, British Columbia Canada
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Ralph - I was missing the margin: 0 auto - now it works!!


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
  •