/    Sign up×
Community /Pin to ProfileBookmark

How to position something below absolutely positioned element?

Is there an easy way to position an element (e.g. div) below an absolutely position div when the height of the div is dynamic?

I have an absolutely positioned side nav menu, and content on the right side of it. I also have a footer displayed at the bottom of my content. There are a couple of times when the content on the right side of the page is smaller (shorter) than the navMenu, so my content footer ends up “inside” of my page content (meaning it is next to my nav menu, instead of below it). When my content is longer than the nav menu, things work as they should.

Any suggestions?

to post a comment
CSS

1 Comments(s)

Copy linkTweet thisAlerts:
@FangDec 16.2005 — wrap a position:relative div around the nav and content. The footer comes after the wrap.
×

Success!

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