Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Vertical space issue between Chrome & Mozilla Reply To: Vertical space issue between Chrome & Mozilla

#252965
Beverleyh
Participant

Using vw for vertical margin here is the closest to % because both will be calculated relative to the container width (important – horizontal and vertical padding/margin, when expressed as %, are both based on the width, not height, of containers). The main difference is that % is calculated and capped at the width of the immediate parent, whereas vw is calculated on screen width. It will therefore keep getting bigger and bigger along with whatever oversized monitor a potential user could be using (which you have no way of controlling or predicting) so you will need to cap it at an appropriate breakpoint or risk massive vertical margins.