Link to home
Start Free TrialLog in
Avatar of tonelm54
tonelm54

asked on

Background fill

Ive been reading about setting a background wallpaper, and several forums say this should work:-
	html {
		background: url(images/wallpaper.png) no-repeat center center fixed; 
		-webkit-background-size: cover;
		-moz-background-size: cover;
		-o-background-size: cover;
		background-size: cover;
    }

Open in new window


It seems to fill, but not when then webpage is maximized and when the window is re-sized the image is scaled so there are gaps when the aspect ratio wont match to fill the screen.

Is there any CSS I can use to fill completely fill the background no matter what the aspect ratio is or maximized?

Thank you
ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial