position: absolute and position: relative. Most important is you understand how this attribute interacts with a child element and its parent container (e.g. an absolute div within a relative div), as well as the bottom, top, left, right attributes.
There's also position: sticky but I think the only time you'll use that is with a navbar
edit: as another user pointed out, there's fixed too. But imo absolute and relative are by far the most important due to how they are influenced by every other element in the DOM.
Hey buddy. What’s the problem?
Just trying to figure out what to use and when to use them.
Been practicing building a number of Tables. Will move on to forms after this.
Just want to be a to style a page from scratch
Learn flexbox religiously, as well as the position attribute. After a lot of practice with that CSS will be a walk in the park for you bro.
Alright, I have not covered flexbox yet. Maybe that will be the key.
For position attribute, which ones do you mean ?
position: relative|absolute|fixed|sticky
Just understand what each of those 4 options does and you'll be miles ahead.
position: absolute
andposition: relative
. Most important is you understand how this attribute interacts with a child element and its parent container (e.g. an absolute div within a relative div), as well as the bottom, top, left, right attributes.There's also
position: sticky
but I think the only time you'll use that is with a navbaredit: as another user pointed out, there's
fixed
too. But imoabsolute
andrelative
are by far the most important due to how they are influenced by every other element in the DOM.I will do that
table is notoriously difficult to style. form inputs also have very peculiar traits, as you have to override browser default styling.
Perhaps take a step back to learn how block elements like div and inline elements like span behave with CSS.