View Full Version : Sidebar Grow with container

10-25-2009, 12:02 PM

I have a #container, and a #rightbar, and I want the #rightbar to grow with the #container even though it hasnt the same amount of info in the #rightbar

Im inserting the side bar through php from header.php

<?php include("rightbar.php"); ?>
<div id="container" class="clearfix">

float: right;
width: 170px;
background-color: #CCCCCC;
clear: left;
margin: 0px;
padding: 0px;

The container

#container {
width: 635px;
position: relative;
margin: 420px 0px 0px;
padding: 0px 4px 0px 0px;

Thanks for any help

10-25-2009, 02:37 PM
wrap #sidebar and #container in a div called #wrapper of say 825px width.

Set the left margin of #container to 190 px to accomodate the #sidebar with a little space between them. (you might need to get rid of the .clearfix style)

Then use a background image in #wrapper to create the "faux" columns, The background image will make it appear that the columns are equal length event though one is shorter.

There have also been other methods suggested here if you search for them.

10-25-2009, 03:29 PM
DW your a star, thanks mate.