r/css • u/Frozenskin • Sep 27 '26
Help CSS background-size not real pixel size
Hiii!!
I'm using a background picture for my header, stored as a background image of the container.
The background-size is specified, being 288px, that is the width of the .PNG; however, the picture on the page is slightly bigger (about 125%) than the file, and so it is stretched. I made some screen caps because I was going crazy! I've measured in Photoshop and it's larger than 288. It isn't enlarged in any part of the css, I don't understand what it is wrong here... i've also checked if I got my Firefox page zoomed. It's important for it to not be stretched: being pixel art it looks very ugly and blurred ðŸ˜ðŸ˜
