Old 05-05-2007, 13:44   #1 (permalink)
e.boal
Loveable loser.
 
e.boal's Avatar
 
Join Date: Apr 2006
Location: Newcastle
Posts: 231
CSS Problem

Probably a basic answer to this....

I have two columns, one floated left (247px) and one floated right (502px) with 1px borders. In the left column, there are three divs and each of this has a margin of 1px at the bottom to separate them. When I put content in one of these divs it overflows and pushes the right float div down the screen! Why is this?
  Reply With Quote
Old 05-05-2007, 13:54   #2 (permalink)
Jayx
Now with added sarcasm.
 
Jayx's Avatar
 
Join Date: Aug 2006
Location: George, South Africa
Posts: 365
Send a message via MSN to Jayx Send a message via Skype™ to Jayx
There could be several reasons for this - you know the drill... post it.
__________________
I made 100 posts and all I got is this stupid signature.
  Reply With Quote
Old 05-05-2007, 13:58   #3 (permalink)
e.boal
Loveable loser.
 
e.boal's Avatar
 
Join Date: Apr 2006
Location: Newcastle
Posts: 231
/* Left Column */

#leftcol {

width: 247px;
background-color:#FFFFFF;
float: left;

}

#newsletter {

background-color: #FFF;
border: 1px solid #0CF;
margin-bottom: 1px;

}

#tools {

background-color: #FFF;
border: 1px solid #OCF;
margin-bottom: 1px;

}

/* Right Column CSS*/

#rightcol {

width: 502px;
float: right;

}

#quickref {

width: 500px;
height: 200px;
background-color: #FFF;
border: 1px solid #7B5561;
float: right;

}
  Reply With Quote
Old 05-05-2007, 13:59   #4 (permalink)
lmclaney
Senior Member
 
lmclaney's Avatar
 
Join Date: Mar 2007
Location: Oxford
Posts: 426
Without seeing your css I would take a guess and say that you need to specify a width for the content in each column so that they dont overflow the columns.

Edit: Ok now seeing your CSS you should first start with not specifying your dimensions in pixels but in percentages as this will allow for the content to expand and contract as a browser screen is changed size and when more content is added.
__________________
Please can somebody change my username?
  Reply With Quote
Old 05-05-2007, 14:00   #5 (permalink)
e.boal
Loveable loser.
 
e.boal's Avatar
 
Join Date: Apr 2006
Location: Newcastle
Posts: 231
If the column div is set do the divs within it not automatically inherit the width?

It is a fixed width layout
  Reply With Quote
Old 05-05-2007, 16:35   #6 (permalink)
pgo
Senior Member
 
Join Date: Jan 2005
Posts: 12,340
They should fit the width of their parent. Do you have a link? Or all the HTML and CSS?
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8