#1
  1. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,650
    Rep Power
    171

    Question about position relative


    Hi;

    In this search box if you type something in the box, it pushes everything else down!

    How can I stop that?

    Thanks
  2. #2
  3. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,650
    Rep Power
    171
    Like this, it is pushing everything down! I want it to go "over" latest deals:
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    194
    Rep Power
    76
    That is because position relative positions the items based on the parent elements attributes while still keeping its own items attributes intact

    For example position relative a 10 px in height div, 5 px down from its parent will of course move it but will also move everything else down by 5px because position relative preserves the items attributes while also positioning it from the parent element
    If you changed it to position absolute, you would see that div move but everything under it stay in their original spots because it is being position on the absolute scope, from the top of the page instead of from its parent

    I might have just screwed up my definition of position relative and absolute but what I said is pretty much how it works

IMN logo majestic logo threadwatch logo seochat tools logo