Click to See Complete Forum and Search --> : [RESOLVED] What is wrong with these codes?


Reddox
03-25-2008, 12:35 PM
I can't figure out what's wrong with my codes. It's supposed to be a div containing text, inside a grey div. But it doesn't work.
Anyone know why?

html:
http://stuff.daftdarkroom.com/daft.txt
css:
http://stuff.daftdarkroom.com/style.css
page:
http://stuff.daftdarkroom.com/daft.html

KDLA
03-25-2008, 12:51 PM
#content {
width:500px;
margin-left:10px;
float:left;
border:solid 1px #000000;
}

When you float an item, you pull it out of the document flow. So the parent div doesn't expand to hold it.

KDLA

Reddox
03-25-2008, 01:10 PM
Thank you. I added a float to the parent div too, and that fixed it.