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

Home Forums CSS How to do a cover but fixed background

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #174982


    I’m trying to build an article page with a nice background image on the header.
    I want this image to cover element and to be fixed.

    When I set background-attachment: scroll; everything works but with background-attachment: fixed; the image get his original size instead of the size of the div

    Here the pen

    I hope somebody can help me ;)

    (Excuse me for my english)

    Alan C

    This has actually been an issue for a while now. As far as I know there is no way to fix it using just CSS, though in the article below a couple of people have posted some work-arounds that might be worth a shot.

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