Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Mar 2014
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Confused about positioning

    I don't quite get when to use relative positioning and when to use absolute positioning, it seems that I can get the same result using both?

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,642
    Thanks
    6
    Thanked 1,005 Times in 978 Posts
    There are a lot of tutorials about that on the internet. But really, this is a concept for more advanced coders. Relative positioning moves the element relative to the current position, keeping the original space of the element intact while absolute positioning takes the element out of the natural flow of elements (i. e. layers it on top of everything so that the element has no influence anymore on other elements that follow). Additionally, the position of absolutely positioned elements relates to the edges of the next parent element that has a position other than “static”, or, if not applicable, the document element (<html>).

    Absolute positioning should be used sparsely and only if you know exactly what you are doing and how and why an element behaves as it does.

  • Users who have thanked VIPStephan for this post:

    cannabis1990 (04-13-2014)

  • #3
    New to the CF scene
    Join Date
    Mar 2014
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thank you, I will just mess around with relative for now and get the hang of it.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •