Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS CSS Background not stretching the whole page

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #268248
    iperez_genius
    Participant

    I have a spinner / loader on my site. At the moment it set to 100% width and 100% height however if I have scrolled to a different part on the page and i click “activate” the spinner background is still only the height and width of the screen and appears at the top of the page.

    https://codepen.io/iperez_genius/pen/mxPPwb

    I know I have top: 0 in the loaderWrapper class however changing this has done nothing.

    #268276
    JeroenR
    Participant

    I would do it like this: https://codepen.io/anon/pen/LdNXqZ/

    #268278
    iperez_genius
    Participant

    Unfortunately that didn’t do the trick….

    here is a new codepen

    https://codepen.io/iperez_genius/pen/dmMrXP

    Once you view it, scroll inside the rendering panel and you will see that the grey background stops.

    #268302
    Shikkediel
    Participant

    You could wrap it all in another div – and change the top position of .loaderBg if you want the spinner to show center screen at the start.

    codepen.io/dmXOzQ

    Without that parent, the element will only be relative to the screen.

    #268321
    JeroenR
    Participant

    Yeah, taking Shikkediel’s example and changed a little: https://codepen.io/anon/pen/XEKxqz
    In this example your loader is fixed in the center.
    So it depends on how you want it to behave, loader vs content.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘CSS’ is closed to new topics and replies.