background colours in 3 columns

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
smiley
New Member
New Member
Posts: 9
Joined: Wed Feb 06, 2008 11:22 am

background colours in 3 columns

Post by smiley »

I would like to have 3 columns website, so I changed code in left sidebar + 1 column

instead of div#main and div#sidebar i put this code (like it write here http://forum.cmsmadesimple.org/index.ph ... l#msg69622 )

div#main {
   float: right;
   width: 57%;
   margin-left: 0px;
   margin-right: 16px;
   padding: 2px;
background-color: #e1ffe3;
}

div#sidebar {
   float: left;        /* set sidebar on the left side. Change to right to float it right instead. */
   width: 18%;     /* sidebar width, if you change this please also change #main margins */
   display: inline;  /* FIX IE double margin bug */
   margin-left: 1em;
background-color: #feff8d;
}

div#rightsidebar {
   float: right;
   margin-left: 3px;
   margin-right: 3px;
   margin-bottom: 5px;
   width: 19%;
   padding: 2px;
background-color: #aefff9;
}

On picture example1.gif I get this kind of background colour, but I would like that colour is full until down of page, like in example2.gif

How to make that colour in columns going to down of page?
Attachments
example2.gif
example1.gif
User avatar
nakkiel
Forum Members
Forum Members
Posts: 70
Joined: Wed Apr 02, 2008 7:15 am

Re: background colours in 3 columns

Post by nakkiel »

It would seem that the banner div is not as long as your page... You could try to put min-height into that div?
KO
Power Poster
Power Poster
Posts: 562
Joined: Mon Nov 06, 2006 7:55 pm

Re: background colours in 3 columns

Post by KO »

Easiest way to do is with "faux-columns" http://www.alistapart.com/articles/fauxcolumns/
Problem probably comes with widths set as %. Much easier with pixels.
smiley
New Member
New Member
Posts: 9
Joined: Wed Feb 06, 2008 11:22 am

Re: background colours in 3 columns

Post by smiley »

thank you thank you thank you :)
it's working! 
Post Reply

Return to “Layout and Design (CSS & HTML)”