The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Why to use CSS Positioning?

  • This topic is empty.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
  • #37834

    I’m learning css. Can anyone please tell me the impotence of using CSS positioning? I can design web pages without positioning. Then why should I use this messy thing? Is there any problem if I don’t use this?

    Thanks in Advance


    If you don’t need it, nobody says you have to use it.

    However, if you are saying you don’t need it because you are using javascript to handle positioning then you might want to reconsider. For maintainability and readability it is good to keep your styles, markup and functionality separate. If this is the case, a quick search on MVC in web development should help you figure out why this is important.

    Otherwise, you do not have to use it. But if you are learning, you should give it a try.



    Thanks for your nice answer. I didn’t work with drop-down menu. So I can’t speak about it. But I can place element sit beside one to another by floating and simply margin and padding. Isn’t it?



    In fact, I used floating, margin and padding to place an element in right place. I didn’t mean I’ll not use it. I just wanted to get the point that when and why use the positioning when I can do it with floating, margin and padding. Thanks for your replay.


    I think you need a better understanding of positioning. You’re using it whether you know it or not. I’m guessing you’re referring to absolute positioning, but keep in mind there’s static, relative, fixed, and absolute (and inherit, but that will be one of the others). The default of course is static, but they each have their place.


    @anika039 I see what you’re saying, but along the way you will come across situations where positioning is the best option. For example:

    – putting something in the absolute center of the page
    – having something always on the same position on the screen, no matter how much you scroll
    – placing an element “over” or “on top” of another element, as if they are layered
    – etc. etc.

    I understand your reservations but that’s just it — it’s hard to explain why you should use it, and you’ll really get that “a-HA!” moment at one point when you come across a situation where positioning will be very helpful.


    Even i was not using css positioning but after watching that video i understood the real use of css postitioning


    @wolfcry911, @Senff, @resweb

    Thanks all of you. I need to study and practice more with all positioning. Special thanks to Senff for making some good points to using positioning.



    Bottom line: do what works. But, in my opinion, it is always, always, always recommended to know as much as you can about the different properties in CSS.

Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘CSS’ is closed to new topics and replies.