I'm migrating from 960 grid to Twitter Bootstrap, which indeed is a headache. Right know I'm manipulating the ground structure (Base.html, using Django), but the output isn't at all what I want it to be. How can I accomplish what I want?
Here's the html:
<div id="container">
<header id='header'>
<!--Header content-->
</header>
<div id='main_container' class='row-fluid'>
<div id="main" role="main" class="span12">
<div id='main_content' class="span9">
<!--Main content-->
</div>
<div id='side_bar' class="span3">
<!--Sidebar container-->
</div>
</div>
</div>
</div>
Output:
__________________________________
| |
| header |
|__________________________________|
| | |
| main | side |
| content | bar |
| | |
| | |
| | |
| <-------- main div -------> |
| | |
___________________________________
Desired output:
__________________________________
| |
| header |
|__________________________________|
|#####| | |#####|
|#####| main | side |#####|
| body| content | bar | body|
| BG | | | BG |
|#####| | |#####|
|#####| | |#####|
|#####| <--- main div ---> |#####|
|#####| | |#####|
___________________________________
Note:
I've tried to change span12
in <div id="main" role="main" class="span12">
to span9
. Then it works, except that everything main div
with it's content gets left aligned). This however can't be the right way of doing it, because that means that the div
s inside the main div
together will be 12
(span9
+ span3
), even though the main div
is 9
.
Note 2: The "#####" is the body's background image, which means the main div should be centered and fill ~60% of the page horizontally.