DIV madness - float/relative/absolute

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • akristof
    New Member
    • Nov 2011
    • 25

    DIV madness - float/relative/absolute

    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
  • drhowarddrfine
    Recognized Expert Expert
    • Sep 2006
    • 7434

    #2
    An absolutely positioned element is always removed from the normal flow and, therefore, will rest on top of whatever elements are there.

    Comment

    • akristof
      New Member
      • Nov 2011
      • 25

      #3
      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)..

      Comment

      • drhowarddrfine
        Recognized Expert Expert
        • Sep 2006
        • 7434

        #4
        Then you put it inside the element you want it next to and make that element 'position:relat ive'.

        Comment

        Working...