Hey there, I'm a beginner to all of this. I want my background image to adjust to fit any web browser resolution, regardless of the size. So far, I've come across this nifty little trick:
html {
background: url(images/bg.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
But here's the catch - it only makes the background fit the full size of the display, not the actual browser window. If the display is 1366x768 and the browser is maximized, then the background looks great. However, if I resize the browser window, the background image doesn't adjust correctly.
So, what do I need to do to make sure the background image adjusts along with the browser window? For example, if the browser is 1300x700, the background should be 1300x700. And if the browser is 900x600, then the background image should also be 900x600. As I mentioned before, I'm still learning so some examples would be greatly appreciated.