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
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)
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.