I’m using this code to center/position a fixed width image as my background. I need to add color around the image that fills the margins in the browser window. I’ve tried background color, border color…
So, the width of the image is 1050px. If the browser window is 1500px I want to make the remaining area black (for instance). How can I do this?
#content {
text-align: left;
width: 1050px;
height: 825px;
margin: 0 auto;
padding: 0px;
background-image: url(file:///X|/CarFingers/tabback1_hor.png);
background-repeat: no-repeat;
}
body {
font-family: Helvetica, Arial, sans-serif;
font-size: 14px;
color: #333333;
text-align: center;
}
<div id="content">
<body>
</body>
</div>
Your HTML is invalid, you should not have a
divtag enclosing thebodytag. If you put thedivwithin thebodyyou should be able to simply set the background color of thebody.