DEV Community

Discussion on: How to decide CSS units for responsive website?

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️
  • em is the parent font size only if it appears in the font-size property, otherwise it's the elements own font-size
  • vw isn't the width of the browser window, but the viewport. That is, window borders are not included*.
  • same for vh

* For whatever reason, scroll bars are included though, which I find mildly infuriating.

Collapse
 
akramnarejo profile image
Akram Narejo

my bad, but again I have already mentioned that what the vw stands for.