@fernandolapaz
Posted
Hi π, regarding your question:
- The page content could be centered using Grid or Flexbox (as you did π), but it is better to use
min-height: 100vh;
for the body, as usingheight
causes the page to be cut off in viewports with small height (such as mobile landscape orientation).
And I take the opportunity for another comment if you don't mind:
- Be careful with using
font-size: 10px
in the root element as that trick is no longer commonly recommended because it can cause issues with accessibility and readability. Also, itβs good to get used to thinking directly in relative units like rem or em since they are the most suitable for most cases.
I hope itβs useful π
Regards,
Marked as helpful