By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,261 Members | 1,674 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,261 IT Pros & Developers. It's quick & easy.

DIV madness - float/relative/absolute

P: 25
Basically, I have been scratching my head about how to accomplish what gmail does in this picture



Specifically the div that pops up when you click "More"

Generally the problem is, how do you position a div to make it float on top of all other divs but still be positioned relative to a specific div (I know how to make a div display on top on all other divs in absolute terms .. and even in relative terms to something else when both it and the something else is clearly a part of another div) but how does one do that so that the div doesn't push other divs out but instead is displayed on top of them?

I'm praying to God this makes any sense to anyone
Dec 15 '11 #1
Share this Question
Share on Google+
3 Replies


drhowarddrfine
Expert 5K+
P: 7,435
An absolutely positioned element is always removed from the normal flow and, therefore, will rest on top of whatever elements are there.
Dec 16 '11 #2

P: 25
Thx..my problem is that I was it to out of the flow with respect to everything else on the page but in the flow with respect to the element I want it to be next to (just to be able to position it on the page properly)..
Dec 16 '11 #3

drhowarddrfine
Expert 5K+
P: 7,435
Then you put it inside the element you want it next to and make that element 'position:relative'.
Dec 16 '11 #4

Post your reply

Sign in to post your reply or Sign up for a free account.