Viewport Height Sections

Weavr’s viewport height classes allow you to easily define the height of a section relative to the viewport height. The classes are as follows, and the height should be self-evident:

  • .viewport-height
  • .viewport-three-quarter-height
  • .viewport-two-thirds-height
  • .viewport-half-height
  • .viewport-one-third-height
  • .viewport-quarter-height

Weavr’s Javascript automatically checks the height of the content contained in a viewport height section and ensures that the container is never shorter than its content. It does this by setting the min-height property of the viewport height section to the height of the content (factoring in margins and padding).

Demonstration

.viewport-height
.viewport-three-quarter-height
.viewport-two-thirds-height
.viewport-half-height
.viewport-one-third-height
.viewport-quarter-height