Forum Moderators: not2easy

Message Too Old, No Replies

Help: 2 columns and width:100%

         

woody993

10:04 am on Jul 20, 2008 (gmt 0)

10+ Year Member



I have 2 divs acting as columns. The one of the left is for navigation and style is this:
#navigation
{
width:190px;
height:400px;
float:left;
padding-left:20px;
padding-top:10px;
background:url(./images/navigation.png) no-repeat;
}

The other one (which is on the right) is for main content and style is this:
#content
{
width:100%;
margin-left:210px;
}

The problem is that the Content div's width is 100% plus the width of the Navigation div. How do I remove this extra width?

birdbrain

11:37 am on Jul 20, 2008 (gmt 0)



Hi there woody993,

and a warm welcome to these forums. ;)

How do I remove this extra width?

If you remove width:100%;, then the #content div will then take up the available space.

birdbrain

woody993

2:38 pm on Jul 22, 2008 (gmt 0)

10+ Year Member



Thanks that worked perfectly (As it should).

birdbrain

3:10 pm on Jul 22, 2008 (gmt 0)



No problem, you're welcome. ;)