Bada
Bada's Coding

Bada's Coding

Standard of 'vw' and 'vh' When There Are Scroll Bars

Bada's photo
Bada
·Sep 25, 2022·

1 min read

'vw'

In Chrome and Firefox, even if a 'vertical' scroll bar is made due to long content, the standard remains the same as when there is no scroll bar. So, in the below example, a 'horizontal' scroll bar is made.

In Chrome and Firefox, if you don't want to make the scroll bar, use '100%'.

'vh'

In Chrome, if a 'horizontal' scroll bar is made due to wide content, then the standard changes. So, in the below example, a 'vertical' scroll bar is not made.

On the other hand, in Firefox, the standard remains the same. So, in the below example, a 'vertical' scroll bar is made.

 
Share this