Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
November 6, 2019 09:42 pm GMT

Some Things You Oughta Know When Working with Viewport Units

David Chanin has a quickie article summarizing a problem with setting an element's height to 100vh in mobile browsers and then also positioning something on the bottom of that.

Summarized in this graphic:

The trouble is that Chrome isn't taking the address bar (browser chrome) into account when it's revealed which cuts off the element short, forcing the bottom of the element past the bottom of the actual viewport.

<div class="full-page-element">  <button>Button</button></div>
.full-page-element {  height: 100vh;  position: relative;

Read article

The post Some Things You Oughta Know When Working with Viewport Units appeared first on CSS-Tricks.


Original Link: https://css-tricks.com/some-things-you-oughta-know-when-working-with-viewport-units/

Share this article:    Share on Facebook
View Full Article

CSS Tricks

A Web Design Community curated by Chris Coyier

More About this Source Visit CSS Tricks