Archived DaniWeb

Featured Imgs 23

Ever wonder what DaniWeb was like way back in the day?

Well now you don't have to guess.

Forums and tags have a new filter in the dropdown to list all Archived topics.

CSS fix for 100vh in mobile WebKit

Featured Imgs 23

A surprisingly common response when asking people about things they’d fix about anything in CSS, is to improve the handling of viewport units.

One thing that comes up often is how they relate to scrollbars. For example, if an element is sized to 100vw and stretches edge-to-edge, that’s fine so long as the page doesn’t have a vertical scrollbar. If it does have a vertical scrollbar, then 100vw is too wide, and the presence of that vertical scrollbar triggers a horizontal scrollbar because viewport units don’t have an elegant/optional way of handling that. So you might be hiding overflow on the body when you otherwise wouldn’t need to, for example. (Demo)

Another scenario involves mobile browsers. You might use viewport units to help you position a fixed footer along the bottom of the screen. But then browser chrome might come up (e.g. navigation, keyboard, etc), and it may cover the footer, because the mobile browser doesn’t consider anything changed about the viewport size.

Matt Smith documents this problem:

On the left, the browser navigation bar (considered browser chrome) is covering up the footer making it appear that the footer is beyond 100vh when it is not. On the right, the -webkit-fill-available property is being used rather than viewport units to fix the problem.

And a solution of sorts:

body {
  min-height: 100vh;
  /* mobile viewport bug fix */
  min-height: -webkit-fill-available;
}

Does this really work? […] I’ve had no problems with any of the tests I’ve run and I’m using this method in production right now. But I did receive a number of responses to my tweet pointing to other possible problems with using this (the effects of rotating devices, Chrome not completely ignoring the property, etc.)

It would be better to get some real cross-browser solution for this someday, but I don’t see any issues using this as an improvement. It’s weird to use a vendor-prefixed property as a progressive enhancement, but hey, the world is weird.

Direct Link to ArticlePermalink

The post CSS fix for 100vh in mobile WebKit appeared first on CSS-Tricks.

4 Sports Blogs That Broke the Mold and Gatecrashed the Mainstream

Fotolia Subscription Monthly 4685447 Xl Stock

Whether you’re a fan of boxing, the beautiful game of soccer, or America’s favorite pastime of baseball, there is a blog out there for you, with dedicated webmasters and writers who have spent years developing and fine-tuning their sites. As a homage to these heroes of the internet, we thought we would piece together a mishmash of some […]

The post 4 Sports Blogs That Broke the Mold and Gatecrashed the Mainstream appeared first on WPArena.

Discoverability with infinite scroll

Featured Imgs 11

How do you handle your link discoverability when also using infinite scroll.

As we know, Google has been ignoring link rel=prev/next for years.

A lot of my older content is showing up with no internal links.

I do have HTML page navigation but its hidden with display:none