/    Sign up×
Community /Pin to ProfileBookmark

How do DIV’s wrap around other DIV’s

Hi,

Yeah, I’ve basically been wanting to know the answer to this queation. I stumbled upon the answer a couple of weeks ago in trying to sort another issue, but as it wasn’t what I was wanting to do, I can’t remember how to do it.

[quote]

#intranet-content-main-container {
float:left;
width:445px;
margin:0 auto;
}

#intranet-content-main {
float:left;
}

#intranet-content-headers {
text-transform: uppercase;
background-color: #00A8CA;
font-weight: bold;
color: #FFFFFF;
margin-bottom:2px;
padding-left:2px;
}

#intranet-content-news {
clear:left;
}

#intranet-content-pics {
float:right;
width:100px;
padding-left:5px;

[/quote]

I know I could probably make the first DIV redundant, and I even know that setting a fixed width is defeating the purpose of what I am trying to do, but I was tired at 2:30 this morning and just wanted to get the layout looking half respectable and try to get some sleep before trying this again today.

See attached image to give you an idea of what I want to do.

[upl-file uuid=fc65ecc9-8461-491c-acf0-733fd5400d48 size=12kB]text_wrap.jpg[/upl-file]

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@CodyTheGrateApr 11.2007 — To me, it looks like you want to have text in a 'main content' area, but then have like a 'floating content' part that the other 'main content' part would wrap around.

I would just float the content you want(within the 'main content'), and the other 'main content' should wrap around it.
Copy linkTweet thisAlerts:
@ray326Apr 12.2007 — See if this has some useful hints.

http://www.alistapart.com/articles/crosscolumn/
×

Success!

Help @badblood 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.5,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...