Reputation: 57
I am displaying a logo on in my header with the following css property:
background: url("images/ogo_b_s.gif") no-repeat scroll left top transparent
height: 92px;
width: 300px;
problem is that my original image is of high quality (4325 X 1450). However, for this image to fit in the above css width and height, I have to scale the image down to (257 X 87) and that reduces the quality of the image significantly. So much so that even the font in the image starts looking weird.
This image has transparent background and is put on top of another image.
I want to know whether there is some way to not scale the image down and have it fit the above css?
Upvotes: 1
Views: 562
Reputation: 40150
You should create the background image specifically to fit in the area you are using it here; don't rely on the browser to do it.
And when you do that, you also might try using a PNG with its alpha transparency, which tends to scale better than GIFs when transparency is an issue.
Upvotes: 0
Reputation: 191749
Two things:
Upvotes: 2