Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Background image cover entire background w/one image

Background image cover entire background w/one image

Views: 16,117

Results 41 to 44 of 44
31 Mar 2012, 11:34 PM
#41
lmw1 avatar

lmw1

Zen Follower

Join Date:
Mar 2007
Posts:
105
Plugin Contributions:
0

Background image cover entire background w/one image

Stop using legacy browsers people!

1 Apr 2012, 1:01 AM
#42
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Background image cover entire background w/one image

Doesnt work in IE 7 or 8 so can't really be used. ...At least if you subscribe to the theory that a website must look identical in every browser, no matter how old.

Background images are rarely critical to site function, and I see nothing wrong with providing a blander or less polished look for antiquated browsers, as long as they function correctly. Make a background color that blends with the image edges, or use a simple hack or conditional-commented stylesheet to serve something that will work for old IE. Rounded corners are another case of this - old browsers can have square-cornered boxes, and modern browsers will render the site in a more modern look.

3 Apr 2012, 11:10 AM
#43
dgent avatar

dgent

Totally Zenned

Join Date:
Nov 2009
Location:
UK
Posts:
1,117
Plugin Contributions:
0

Re: Background image cover entire background w/one image

gjh42:

...At least if you subscribe to the theory that a website must look identical in every browser, no matter how old.

Background images are rarely critical to site function, and I see nothing wrong with providing a blander or less polished look for antiquated browsers, as long as they function correctly. Make a background color that blends with the image edges, or use a simple hack or conditional-commented stylesheet to serve something that will work for old IE. Rounded corners are another case of this - old browsers can have square-cornered boxes, and modern browsers will render the site in a more modern look.

I meant by my post, that if you use that code on a site running IE 8 etc, it will look 'wrong' as it will just dump a small image of your background in the corner of your screen, whereas rounded corners for example, just show square on older IE - which is only a subtle difference.

3 Apr 2012, 2:18 PM
#44
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Background image cover entire background w/one image

Yes, the background-size is a more pervasive effect which would require some sort of special handling for legacy browsers to not look broken, where rounded vs. square corners is a detail. That's why I mentioned bg colors or IE hacks.