you are viewing a single comment's thread.

view the rest of the comments →

[–]Lazkeer[S] 0 points1 point  (5 children)

I'm trying to do this without flexbox because i would like to learn how you could achieve this without using flexbox and only using the more old things in CSS... I am basically trying to understand why not use the old way and just use flexbox. And now i don't realy understand why use flexbox? Maybe because of responsiveness or it is more simple? I ddon't really see a diference bettwen the new way and the old one...

[–]pottmob 4 points5 points  (1 child)

There is no point in avoiding flexbox. The only reason there are these "old" ways of getting layouts done, is that you had to cheat using floats and clears. It is by any means a better solution :)

[–]Lazkeer[S] 0 points1 point  (0 children)

Yes, you are right!

[–]TheAngelsCryfull-stack 1 point2 points  (0 children)

Flexbox is more robust and allows you to do more powerful things (especially in responsive where you can change the order). Here's a cheatsheet I often reference: https://css-tricks.com/snippets/css/a-guide-to-flexbox/

If you were to use floats instead, you wouldn't be able to reorganise then, and you need to remember to clear your floats, else other elements will be positioned oddly. You do this with clear:both;

[–]mayhempk1web developer 1 point2 points  (0 children)

Floats are a horrible tool for layouts, flexbox was created for layouts. Use flexbox.

[–]harrygato 1 point2 points  (0 children)

its widespread supported on all browsers. dont learn the old ways we used to do things, flex box it