As I develop a website on my 13-inch MacBook, I encountered an issue with the background image being too large for my screen. Is there a way to maintain the aspect ratio while designing so that it looks consistent when scaled up or down?
I tried using the following code to scale the background image to fit the entire screen:
background: url(images/background.jpg) no-repeat center center fixed;
background-size: cover;
In addition, I wrapped the content in a page wrapper:
#wrapper {margin: 0 auto 0 auto; width:1070px;height:auto;
However, I found that the content was overlapping the image instead of maintaining the correct ratio. The background image is sized at 1772x1240 while the green box is 1070 pixels wide. Is there a way to design the layout while keeping these ratios intact?