/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] What is wrong with these codes?

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:
[url]http://stuff.daftdarkroom.com/daft.txt[/url]
css:
[url]http://stuff.daftdarkroom.com/style.css[/url]
page:
[url]http://stuff.daftdarkroom.com/daft.html[/url]

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@KDLAMar 25.2008 — <i>
</i>#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
Copy linkTweet thisAlerts:
@ReddoxauthorMar 25.2008 — Thank you. I added a float to the parent div too, and that fixed it.
×

Success!

Help @Reddox spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...