Hello, im new to html and css. Im also learning a bit of Javascript and want to have a good understanding of these concepts, but recently Ive found that I may not understand CSS as well as I initially thought I did. Ive been using position relative to layout my webpages. I quickly came to understand that this was not the best practice due to relative positioning leaving blank spaces visually in the layout. So I learned that it may be better to use margins to move elements around for layout purposes. However, Im feeling that this is extremely tedious because im adding a margin top, margin bottom, margin left etc. to almost every element to get them to layout the way that I want.
I guess my question is, Is this an accepted or even a actual way to layout pages or am I doing it all wrong? Im starting to learn about Flexbox and Im thinking that maybe this will be a ‘cleaner’ way to layout my pages. Is this the ‘correct way’ to do things? Is learning CSS Flexbox a MUST when it comes to layout? I just want to know if Im on the right track because it really feels like im taking stabs in the dark when it comes to getting a better understanding of layout practices in CSS. Please help.
Any advice and guidance will be greatly appreciated.
Thanks.