@haquanq
Posted
Hello Adam,
About your feedback question:
- Most of the time you would like your element's content to determine it's height (not width) and using
min/max-width
to set a boundary for it'swidth
on screen size changes. The reason for that is because our device sizes often change it'swidth
size (from mobile to desktop and opposite, phones nowadays are huge and has it's height almost as long as a small laptop) the most and keep the content centered to the middle of the screen. - Depend on the behavior of the app you would like to achieve,
rem/em/px
are always appropriate, maybe you would like you spacings to stay the same thenpx
or elserem/em
.
About your solution:
- Page must have one
main
landmark (read more here)) which means wrap the mot important content of the page inside it. - Use more semantic HTML elements such as
article, section, p
. For example, you can wrap your content inside asection
orarticle
instead ofdiv
(div
has no semantic meaning). - When using headings, never skip any level, always go from
h1-h6
and never determine a heading level because of the size on the design (visual can change, the flow of content does not).
Have a nice day!!
Marked as helpful
@haquanq
Posted
hey, forgot about the question when to use display: flex
:
display: flex
allow you to control the layout of it's child elements (multiple child elements) such as give them even space in between or change their direction.- Property
display
has several value which affect itself or it's child elements, Kevin Powell on Youtube recently has a nice video about this topic
Marked as helpful