Conversion Form

VH
PC

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: vhpc

Use vh for responsive full-height sections and pc for print-based typography.

Quick Reference: Unit Conversion by Tens

VHPC
10vh6.75pc
20vh13.5pc
30vh20.25pc
40vh27pc
50vh33.75pc
60vh40.5pc
70vh47.25pc
80vh54pc
90vh60.75pc
100vh67.5pc
110vh74.25pc
120vh81pc
130vh87.75pc
140vh94.5pc
150vh101.25pc
160vh108pc
170vh114.75pc
180vh121.5pc
190vh128.25pc
200vh135pc
210vh141.75pc
220vh148.5pc
230vh155.25pc
240vh162pc
250vh168.75pc

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 responsive heights, pc for typographic scaling in print.

Real Code Example

/* Mobile-first card with vh → pc */
.card {
  padding: 0vh;     /* undefinedpc */
  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