View Full Version : One background covers, one repeats x and y
11-25-2012, 01:34 AM
Basically, I want to use two background images for my body div. I want one to cover the whole page, and one to repeat by x and y. How could this be done?
I was following this: http://icode4you.net/css-tricks-use-two-background-images-for-one-div, but it doesn't explain how to make one background cover the whole page, without repeating, while having another background repeating.
11-25-2012, 03:50 AM
It's kind of hard to tell without seeing your images but I'm guessing the image you want to fill the whole page needs to dynamically resize to different resolutions without skewing the height/width ratio.
That would require a bit of js - http://johnpatrickgiven.com/jquery/background-resize/
Then you could add a 100% height/width container that would repeat your other image.
11-25-2012, 10:22 AM
One image was a gradient, the other was a 10x10 square.
But anyways, I found the right css syntax to do so:
background-size: cover, 5px 5px;
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.