So I was wondering what would be a perhaps better way to do this than my current way now.. What I am trying to do is have a bar at the top of the page where login and stuff will be, with a background(color) that streches out as the page/browser stretches out, but with centered content inside. My code goes something like this:
HTML:
<div class="bg_color"><div class="width">
<div class="something01">stuff in one collumn</div>
<div class="something02">stuff in another collumn</div>
<div class="something03">stuff in last collumn</div>
<div class="clear"><div></div></div>
</div></div>CSS:
.bg_color { width: 100%; background: #000; }
.width { width: 960px; margin: 0 auto; }
.something01 { float: left; }
.something02 { float: left; }
.something03 { float: left; }
.clear { clear: both; }
I need to have a backgroundcolor that stretches across the entire page (not just the 960px). I know this isn’t the best way, but I just keep messing it up any other way ;p
What would be a better way to do this?