how to modify 2 column layout for my content
Posted: Tue Oct 09, 2007 10:48 pm
Hello everyone,
I'm migrating a site to cmsms and I've run into a small problem.
I'm using the css menu left + 1 column template.
The width of my header is about 800px. So this is what I've set the width of my page to.
My problem is that the css left menu takes up about 30% of the page width all the way down the page.
What I would like to do is end the menu column so I can maximize the width of the page below the menu.
CSS Menu left + 1 column layout:
_____________
| | |
| | |
| | |
| | |
|__|_________|
What I'm going for:
______________
| | |
| | |
|__| |
| |
|____________ |
Not the best drawing but you can see that I'm trying to make use of the space under the css menu column.
Here is the breakdown of my template:
The page wrapper setting my maximum page width, so my header fits the page:
/* center wrapper, min max width */
div#pagewrapper {
border: 1px solid black;
margin: 0 auto; /* this centers wrapper */
/* max-width: 80em; IE wont understand these, so we will use javascript magick */
/* min-width: 60em; */
max-width: 787px;
min-width: 787px;
background-color: #fff;
color: black;
}
Here is how the left column and right columns are layed out to accomodate the menu on the left and content on the right:
div#main {
margin-left: 29%; /* this will give room for sidebar to be on the left side, make sure this space is bigger than sidebar width */
margin-right: 2%; /* and some air on the right */
}
div#sidebar {
float: left; /* set sidebar on the left side. Change to right to float it right instead. */
width: 26%; /* sidebar width, if you change this please also change #main margins */
display: inline; /* FIX IE double margin bug */
margin-left: 0;
}
Writing this out makes me think I need a third div tag that would sit below these two and have a width of 100%.
Not sure how to write this... perhaps like so:
div#main2 {
margin-left: 0;
margin-right: 2;
width: 100%;
clear: both;
}
Any help would be appreciated!
Thank you,
TJ
I'm migrating a site to cmsms and I've run into a small problem.
I'm using the css menu left + 1 column template.
The width of my header is about 800px. So this is what I've set the width of my page to.
My problem is that the css left menu takes up about 30% of the page width all the way down the page.
What I would like to do is end the menu column so I can maximize the width of the page below the menu.
CSS Menu left + 1 column layout:
_____________
| | |
| | |
| | |
| | |
|__|_________|
What I'm going for:
______________
| | |
| | |
|__| |
| |
|____________ |
Not the best drawing but you can see that I'm trying to make use of the space under the css menu column.
Here is the breakdown of my template:
The page wrapper setting my maximum page width, so my header fits the page:
/* center wrapper, min max width */
div#pagewrapper {
border: 1px solid black;
margin: 0 auto; /* this centers wrapper */
/* max-width: 80em; IE wont understand these, so we will use javascript magick */
/* min-width: 60em; */
max-width: 787px;
min-width: 787px;
background-color: #fff;
color: black;
}
Here is how the left column and right columns are layed out to accomodate the menu on the left and content on the right:
div#main {
margin-left: 29%; /* this will give room for sidebar to be on the left side, make sure this space is bigger than sidebar width */
margin-right: 2%; /* and some air on the right */
}
div#sidebar {
float: left; /* set sidebar on the left side. Change to right to float it right instead. */
width: 26%; /* sidebar width, if you change this please also change #main margins */
display: inline; /* FIX IE double margin bug */
margin-left: 0;
}
Writing this out makes me think I need a third div tag that would sit below these two and have a width of 100%.
Not sure how to write this... perhaps like so:
div#main2 {
margin-left: 0;
margin-right: 2;
width: 100%;
clear: both;
}
Any help would be appreciated!
Thank you,
TJ