pilsnermonkey
01-19-2013, 09:46 PM
I have a 3 column liquid layout. All columns are liquid: .sidebar1 (left is blue color background - no images) .content (middle is white background - no problems) and .sidebar2 (right is blue background color). 20% - 60% -20%. They live within .container which sets full page view at 90% with max-width: 1260px and min-width: 780px.
I'm struggling with an issue that seems common but I have not found a solution that works yet. The center column (.content) varies in length on a number of pages based on how much info and text the page contains. Some are long and scroll.
The content in sidebar1 div column and sidebar2 div column is generally not as long as the .content column. The result is a short blue colored column on the left and a short blue colored column on the right.
I would like those two blue columns to stretch to the bottom of the page on all pages regardless of the amount of text & stuff in the .content div, hopefully using only the background color property instead of an image. (I think the flexible nature of the 2 sidebars would make an image background too complicated and possibly inconsistent across browsers and screen resolutions.)
Initially, I messed and messed with 4 main divs plus a footer div. No luck no matter what tweak I applied. After searching a lot, it looks as though I need to place the 2 .sidebar columns within a container so I've created .sidebar1container and .sidebar2container and wrapped those around .sidebar1 and .sidebar 2..
Am I on the right track? Is anyone familiar with this issue and have a potential solution?
Original HTML
HTML
<div class="container">
<div class="sidebar1">
<div class="content">
<div class="sidebar2">
Original CSS
.container {
width: 90%;
max-width: 1260px;
min-width: 780px;
}
.sidebar1 {
float: left;
width: 20%;
background-color: #93A5C4;
padding-bottom: 10px;
color: #FFF;
}
.sidebar2 {
float: left;
width: 20%;
background-color: #93A5C4;
padding: 1px 0;
}
.content {
padding: 10px 0;
width: 60%;
float: left;
}
NEW HTML direction
<div class="container">
<div class="sidebar1container"
<div class="sidebar1"></div>
</div>
<div class="content"></div>
<div class="sidebar2container">
<div class="sidebar2"></div>
</div>
NEW CSS direction
.container {
width: 90%;
max-width: 1260px;
min-width: 780px;
}
.sidebar1container {
????
}
.sidebar1 {
float: left;
width: 20%;
background-color: #93A5C4;
padding-bottom: 10px;
color: #FFF;
}
.sidebar2container {
???
}
.sidebar2 {
float: left;
width: 20%;
background-color: #93A5C4;
padding: 1px 0;
}
.content {
padding: 10px 0;
width: 60%;
float: left;
}
Thanks for looking.
I'm struggling with an issue that seems common but I have not found a solution that works yet. The center column (.content) varies in length on a number of pages based on how much info and text the page contains. Some are long and scroll.
The content in sidebar1 div column and sidebar2 div column is generally not as long as the .content column. The result is a short blue colored column on the left and a short blue colored column on the right.
I would like those two blue columns to stretch to the bottom of the page on all pages regardless of the amount of text & stuff in the .content div, hopefully using only the background color property instead of an image. (I think the flexible nature of the 2 sidebars would make an image background too complicated and possibly inconsistent across browsers and screen resolutions.)
Initially, I messed and messed with 4 main divs plus a footer div. No luck no matter what tweak I applied. After searching a lot, it looks as though I need to place the 2 .sidebar columns within a container so I've created .sidebar1container and .sidebar2container and wrapped those around .sidebar1 and .sidebar 2..
Am I on the right track? Is anyone familiar with this issue and have a potential solution?
Original HTML
HTML
<div class="container">
<div class="sidebar1">
<div class="content">
<div class="sidebar2">
Original CSS
.container {
width: 90%;
max-width: 1260px;
min-width: 780px;
}
.sidebar1 {
float: left;
width: 20%;
background-color: #93A5C4;
padding-bottom: 10px;
color: #FFF;
}
.sidebar2 {
float: left;
width: 20%;
background-color: #93A5C4;
padding: 1px 0;
}
.content {
padding: 10px 0;
width: 60%;
float: left;
}
NEW HTML direction
<div class="container">
<div class="sidebar1container"
<div class="sidebar1"></div>
</div>
<div class="content"></div>
<div class="sidebar2container">
<div class="sidebar2"></div>
</div>
NEW CSS direction
.container {
width: 90%;
max-width: 1260px;
min-width: 780px;
}
.sidebar1container {
????
}
.sidebar1 {
float: left;
width: 20%;
background-color: #93A5C4;
padding-bottom: 10px;
color: #FFF;
}
.sidebar2container {
???
}
.sidebar2 {
float: left;
width: 20%;
background-color: #93A5C4;
padding: 1px 0;
}
.content {
padding: 10px 0;
width: 60%;
float: left;
}
Thanks for looking.