Forums

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

Home Forums CSS trouble with background image + gradient, fixed.

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #43907
    Nathan Gross
    Participant

    I’ve created a codepen:
    http://codepen.io/nathangross/pen/JGDiq

    I’m having trouble getting the gradient to be fixed along with the background image. The gradient is applied with a pseudo element. I’m using:

    background-attachment: fixed;

    But it doesn’t seem to be working. Any ideas?

    Thanks!

    #140719
    waylaid
    Member

    Make the pseudo element **position:fixed** as well instead of absolute.

    Removing **background-attachment** doesn’t seem to do any harm but I only checked in Chrome.

    #140721
    Nathan Gross
    Participant

    ah nice! thanks.

    I checked in FF and it works, but that gradient is kinda whack. It’s really small. Any ideas?

    #140731
    waylaid
    Member

    No, I’m not that great with gradients…

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