/    Sign up×
Community /Pin to ProfileBookmark

Relative & Absolute DIVs…

Is there anyway to make an absolute-positioned DIV force a relative-positioned DIV directly below it, to move with it when resized?

Example:

RRRRRRRRRRRRRRR
RRRRRRRRRRRRRRR

RRRRRRRRRRR AAAA
RRRRRRRRRRR AAAA

RRRRRRRRRRRRRRR
RRRRRRRRRRRRRRR

Now, when resized (using the mouse scroll to change the size of the text also increasing the size of the DIVs) the AAAA (absolute) DIV flows over the RRRR (relative) DIV below it.

Can’t we all just get along?

?

to post a comment
CSS

9 Comments(s)

Copy linkTweet thisAlerts:
@VladdyApr 08.2004 — That is what float is for.
Copy linkTweet thisAlerts:
@stmasiauthorApr 08.2004 — Cool.

However, when I "float:right;"...even when I contain both the DIVs inside another, it still overlaps the one below.

Thanx.
Copy linkTweet thisAlerts:
@VladdyApr 08.2004 — Use clear on the one below
Copy linkTweet thisAlerts:
@stmasiauthorApr 08.2004 — Hmm...

Closer...I think.

Now, the floated column is going behind the one below it instead of over it.

Thanx.
Copy linkTweet thisAlerts:
@VladdyApr 08.2004 — Got a link???
Copy linkTweet thisAlerts:
@VladdyApr 08.2004 — So how is that layout different from what you want???
Copy linkTweet thisAlerts:
@stmasiauthorApr 08.2004 — I would like to have the links DIV and the footer DIV separate...just like the rest of the DIVs on the page.

Thanx.
Copy linkTweet thisAlerts:
@SamApr 08.2004 — you need to apply clear:right; to #footer, not #footer p, and you don't need to use clear:both, since there is only a right float
×

Success!

Help @stmasi 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,
)...