0

Hi,

I made this code shown below to display a background image. It is possible to make it fixed for all resolution without showing white background?

CSS code:

body
{
    background-attachment: fixed;
    background-image: url(../layout/background.jpg);
    position: absolute;
    min-height: 768px;
    min-width: 1024px;
}

Thanks
marifard

3
Contributors
4
Replies
17
Views
2 Years
Discussion Span
Last Post by Troy III
0

Your code is fine, no problem there.

The reason for this is because your background image is clearly the wrong dimesions to support mobile resolutions. If you'd like me to check to give you a definitive answer, upload/link to your background image.

0

I use this image. It is better to make it smaller through photoshop and uploaded again?

Thanks.
marifard

0

The danger with background images is that they have to be big enough to support all devices, so they have to be big. This goes against every 'good' web practice with images, as you're always told to reduce the size.

If you really want to use a background image, make it fairly big (at least 1200px wide). Save it in Photoshop with a reasonable amount of quality, but focus on the filesize.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.