Learn CSS positioning in ten steps

CSS positioning

Here’s an interactive tutorial I’m working on:

Learn CSS Positioning in ten steps

I’m using it to give some CSS and HTML training today. It uses a customized version of my JavaScript tabs interface and triggers a styleswitcher each time you switch tabs, so you can see the CSS change right on the page.

It’s a work in progress, so let me know if you have any suggestions.

83 Responses to “Learn CSS positioning in ten steps”

  1. Tyler G says:

    Thank You Very Much.

  2. Venky says:

    Hi,

    CSS has always been very tricky to understand. I have looked at several websites, but i think u have explained very well. Want to chk it out asap on my project !

    Thanks a tonne.

    Venky

  3. Gaurav says:

    Hi,

    Nice explanation, highly useful for beginner.

    Thanks a million….
    Gaurav

  4. Yamuyel says:

    Thank you very much.

  5. Giorgos says:

    Crystal Clear!!
    Thanks!

  6. Fatih Güneş says:

    Excellent tutorial. Thank a lot !

  7. William F says:

    From a pure Java developer… Thanks so much for this tutorial. This “front end” stuff can give me a headache.

  8. Mallikarjuna Kenchappagoudra says:

    Thanks you.

    You have just clarified 1000’s doubts on CSS positioning in just 10 steps. I feel like I can do anything now using those techniques.

    Thank you

  9. Todd Cary says:

    There is one more feature that I would like to be able to do with the columns: have the one on the left go to the same height as the one on the right, so it it were blue in color, there would be a blue column all the way to the bottom.

    Can this be done with the tags?

    Todd Cary

  10. Saikat says:

    One of the best tutorial available on-line. Thanks a ton.

  11. imissmyjuno says:

    May I.. kiss you? Ever since I found it and, thankfully, bookmarked it (as I was not able to readily find it in Google again ever since), I’ve been not only using this on a regular basis but recommending it to everyone who bugs me about the topic. There is simply no other more concise and understandable way to learn about this.

    Big THANKS!

  12. Tiago Braga says:

    Good one!
    Thanks a lot…

  13. UniWeb says:

    Thanks, this helped a lot. I finally got it! *smacks his own forehead*

  14. sgk says:

    Excelent tutorial, I’ll pop a link in couple blogs blogs.. “CSS positioning” gave a search result in google.

  15. Rob says:

    Thanks! this was extremely helpful.

  16. Jordan says:

    I just started learning HTML about two months ago. I went through tutorials, and then discovered that all help forums and such advise to build towards divs and CSS. I find it easier to do, easier to read, and easier to change. The only difficulty I was having was free-handing the divs in a text document to practice, because of lack of clear explanation on divs in css. This has made it so much easier to learn and go back and check my work. Thank you so much. Rest assured you will be linked to when I get it up and running, and the revenue ads on your page will be clicked…regularly.

  17. Muditha says:

    I am really new to world of SE and i’m being a developing my first webSite.
    This simple tutorial helped me lot…. I was fed up with hw to possitioning the controls and images in my web page….
    Only this one helps me really…. not even a W3Schools…
    Thank you very much for publishing this….

  18. Neil says:

    very straightforward explanations for what can be a (sometimes) confusing topic - i picked up more on your tutorial than i did through some of the popular css books out there. keep up the good work… i look forward to anything else you might decide to provide a tutorial on.

  19. Bianca says:

    This helped me soo much. Thank you!

  20. James says:

    My hero! Your clear explanation of position:relative has helped me do in 2 minutes what I’d been struggling with for 2 whole evenings. Keep it up!

  21. dharmachick says:

    Excellent…….very simple and easy to understand. I had tried to teach newbie designers about CSS positioning, and they never quite grasped it. Your tutorial is very easy to understand, and is at the top of our bookmarks! Thanks for taking the time to compile this.

  22. Toby says:

    I found that I could have a div following the divs positioned using relative/absolute. I had a container that was relative, enclosing 2 divs that were absolute, as in the tutorial. I did not want to use float since resizing the browser window will shift the divs if they no longer fit side-by-side.
    I changed the larger of my two internal divs to use position:relative - and it works! A div following the container div will now render as expected (below the container div) and the 2 divs inside the container will be side-by-side and stay that way even when resizing the window. Sweet.
    #Container - relative
    #Left - absolute top:0 left:0 width:50
    #Right - relative top:0 left:50
    #Footer - no positioning needed

  23. Phi says:

    I had been getting confused by the language of ‘absolute’ and ‘relative’.

    I assumed a child div would be positioned ‘relative’ to an ‘absolute’ly positioned parent. Whereas I should use ‘absolute’ positioning for the child which will position it relative to the parent.

    I realise now that a third invisible element is part of this logical system which is ’static’ or ‘where the div would be if no other positioning information is applied’.

    Your 10 step tutorial broke it down into bite-size chunks and helped me get it. Many thanks.

  24. house9 says:

    great stuff!

    I never knew about the “position:relative + position:absolute” - this is very useful in certain situations

    Thanks

  25. LoneWolf says:

    Thanks for this tutorial. Step 4 was the one thing that I never really clicked into before. It makes things so much easier to understand how to do absolute within a block rather than the whole page! Your examples are simple, yet very effective. Keep up the great work!

  26. John says:

    Excellent tutorial.
    Well thought out and easy to follow.

  27. Athar Bilal says:

    THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU

    You have no idea how much youve help me with this very simple definition of the position property .

    keep up the good work

  28. kim says:

    This was the very best explanation of this that I have ever seen. Well Done!!

  29. Mohammad says:

    the best concise tutorial in css positioning

  30. Dave Pawson says:

    Many thanks. good content, very clear explanation. Very much appreciated.

  31. Prakhar Srivastav says:

    Thanks a million.. the best tutorial out there….. one little suggestion though
    the background color of div after and before is a bit difficult to see….

    awesome tutorial… thank u

  32. Mathias Rost says:

    Excelent tutorial. Helped a lot!!

  33. dAm2K says:

    Thank you so much!
    relative + absolute positioning was not clear to me, and now it is!
    Great great great. Thanks!

    Dino.

Leave a Reply