Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Oct 2008
    Posts
    185
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Stretching Header to Accomodate Background Color

    Hi, everyone. Here's the site I'm working on: http://bit.ly/QCMdge (password to log in is "freoly").

    I'm trying to stretch this top section of the header all the way out so that it spans from the far left of the browser to the right (please see pic below. This is what I want it to look like. I'm trying to stretch it out so I can use that sea-green background). How do I do that? I need to stretch it out I can use a colorful background that stretches all the way across the top, from left edge to right edge. I want the width of everything else to stay the same.




  • #2
    Regular Coder
    Join Date
    Dec 2010
    Posts
    424
    Thanks
    22
    Thanked 56 Times in 56 Posts
    Well the problem is that you have all the content inside of the "container" div. Which is centered and a specific wdith.

    What you need to do is have something like this

    Code:
    <div class="top">
        <div class="container">
            <div id="cart-summary"></div>
        </div>
    </div>
    So you make the top div span 100% and have the background colour
    Then you have all of the content for that inside of the container div which is centered.

    Hope this helps.

  • #3
    Regular Coder
    Join Date
    Oct 2008
    Posts
    185
    Thanks
    12
    Thanked 0 Times in 0 Posts
    That helps. Thanks!

    I figured that was the problem but I was afraid to move around containers... I was worried about the effects.

    I will try that. Thank you!


  •  

    Posting Permissions

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