Sun Dial Menu
Disabling/Hiding Scrollbars
Menu Disabling/Hiding Scrollbars
 

Disabling/Hiding Scrollbars

Having come across the ByteDance website I was asking myself why you would want to turn off the scrollbars on a web page.

On further reseach I find that this is something you can do and the reason for doing so was explained on the LogRocket website:

" The scrollbar can make an otherwise elegant website look like it’s from the 90s, but thanks to new CSS properties, we can hide the scrollbar without impacting our users’ ability to scroll. "

and.....

" Hiding a scrollbar also helps you save space for other content on your page — it can make for a more consistent user experience across different devices because different operating systems may not render the scrollbar in the same way.
However, the most common reason to hide a scrollbar is to improve mobile viewing experiences. "

There is a philosophical discussion here relating to scrollbars, looking at the Google Analytics web interface the scrollbars are barely visible but they are there and often difficult to use. The GSC screens/reports have scrollbars on the sub-windows.

This page has the scrollbar hidden/disabled - the page is still scrollable. How this is done on this page.

Top

How I thought I could use this

The display of a page on a mobile device, or any touch screen, often does not need a scrollbar as the default behaviour is to scroll the screen with your finger. If there is no more information to display, who cares?

The code

Here we have both a pseudo-element and -webkit technique used here. (I admit here that I have somewhat muddled pseudo-elements and pseudo-classes - but if I have I dread to think what other mis-directions are out there - mine and others!)

The CSS code for suppressing the scrollbar is:

<style>
body::-webkit-scrollbar{
display: none;
}
</style>

What I don't fully understand at the moment is that the styling is on the body element but on my design layout the scrollbar still shows on the side-bar overlay (which is still in the body section.

How this looks on a iPhone

A comment that I found in my research on this subject was that this would not be the same when viewed on a mobile phone. This does seem to be the case on my iPhone. While I have suppressed the scrollbars on my index page they still show on the iPhone.

Links

External Links Disabled.

tempusfugit.me.uk is a non-commercial website. No payment or benefit is gained by the placement of links toother websites.

The External link is disabled to on this page, please visit other pages

Unlike most genealogical research websites tempusfugit.me.uk does not attempt to get you to "sign-up" when you click on one of their links.

This Wikipedia link is disabled.

The link on Wikipedia was to:

External Links Disabled.

tempusfugit.me.uk is a non-commercial website. No payment or benefit is gained by the placement of links to other websites.

The External link is disabled to on this page, please visit other pages

Top

External Links - references

Site design by Tempusfugit Web Design -