-4

I have a pre-loader implemented into my site and when I load the site to activate the pre-loader there is a scroll bar on the side. This is because the website is scrolling in the background while my pre-loader and full-size background is in-front.

Is there any way I can make my pre-loader the main focus until it disappears then the scroll bar can appear for my main page?.

I am using HTML, CSS and JS for this loader.

Framework
  • 1
  • 3

2 Answers2

0

From what I can tell, your preloader script seems to work by fixing an element over the entire page until the rest of the page has loaded.

In this case, adding style='overflow-y: hidden;' to the body would work.

Once your page loads, you will need to remove that style to allow the user to scroll and see the scrollbar again. It depends on the loader you are using. There should be a way to hook in javascript upon page load.

Chrissi
  • 349
  • 3
  • 15
  • The pre-loader renders over the top of the main page but it is set on a delay so it doesn't disappear once the page has loaded it disappears after the delay has ended. – Framework Nov 04 '15 at 17:05
0

I used what you said and then just removed the Attr once the page loaded.

Framework
  • 1
  • 3