Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-03-2012, 10:26 PM   PM User | #1
jihanemo
Regular Coder

 
Join Date: Oct 2008
Posts: 183
Thanks: 12
Thanked 0 Times in 0 Posts
jihanemo is an unknown quantity at this point
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.



jihanemo is offline   Reply With Quote
Old 12-03-2012, 11:08 PM   PM User | #2
aaronhockey_09
Regular Coder

 
Join Date: Dec 2010
Posts: 411
Thanks: 21
Thanked 55 Times in 55 Posts
aaronhockey_09 is an unknown quantity at this point
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.
aaronhockey_09 is offline   Reply With Quote
Old 12-03-2012, 11:57 PM   PM User | #3
jihanemo
Regular Coder

 
Join Date: Oct 2008
Posts: 183
Thanks: 12
Thanked 0 Times in 0 Posts
jihanemo is an unknown quantity at this point
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!
jihanemo is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:44 AM.


Advertisement
Log in to turn off these ads.