Conversion Form

VH
PERCENTAGE

About the Unit

VH (Viewport Height): Like VW, VH is a relative unit, but instead of being based on the viewport width, it is based on the height of the viewport. 1vh represents 1% of the viewport height, meaning that if the viewport height is 1000px, 1vh will be equal to 10px. The vh unit is widely used when you want elements to occupy a percentage of the screen height, making the design more adaptable to different device sizes. A common use case is to create 'hero sections' or headers that occupy the full height of the screen. For example, if you set an element’s height to 100vh, it will occupy 100% of the viewport height, ensuring that the content automatically adjusts to the screen height of the device, regardless of its resolution. This unit is also useful for scroll layouts on long pages, where the height of elements is crucial for navigation.

Pro Tip: vhpercentage

Use vh for full-height sections and % for relative layout resizing.

Quick Reference: Unit Conversion by Tens

VHPERCENTAGE
10vh10800%
20vh21600%
30vh32400%
40vh43200%
50vh54000%
60vh64800%
70vh75600%
80vh86400%
90vh97200%
100vh108000%
110vh118800%
120vh129600%
130vh140400%
140vh151200%
150vh162000%
160vh172800%
170vh183600%
180vh194400%
190vh205200%
200vh216000%
210vh226800%
220vh237600%
230vh248400%
240vh259200%
250vh270000%

Live Unit Preview

See how different CSS units affect the size of the box below:

10px

10rem

10em

10%

10vw

10vh

Common Mistake

Use vh for full-height sections and % for relative layout resizing.

Real Code Example

/* Mobile-first card with vh → percentage */
.card {
  padding: 0vh;     /* undefined% */
  font-size: 1.5rem;
  width: min(90vw, 40ch);
}

Frequently Asked Questions About VH

When should I use vh instead of vh?

Use vh for vertical scaling and full-height sections.

How many vh is 1vh?

1vh = 1% of the viewport height.

Is vh affected by screen size?

Yes, it changes with browser height.

Is vh good for hero sections?

Yes, it's perfect for full-screen components.

Keyboard Shortcuts

  • Ctrl + C: Convert
  • Ctrl + I: Invert units
  • Esc: Reset values

More popular conversions