I have problem with the background div, when I resize the window too much, the browser cut off the left and top side of that div (background image).
How can I stop that?
That is my index.html
<div id='wrapper'>
<div id='background'></div>
<div id='menu'></div>
<div id='lang'></div>
<div id='content'></div>
<div id='contact'></div>
</div>
And css:
* {
margin: 0;
padding: 0;
}
body {
font-size: 12pt;
font-family: Helvetica, sans-serif;
text-align: center;
width: 100%;
height: 100%;
}
#wrapper {
width: 900px;
height: 400px;
position: absolute;
left: 15%;
top: 25%;
}
#background {
background-image: url('gfx/6_small.jpg');
margin-left: -150px;
margin-top: -150px;
min-height: 657px;
min-width: 1218px;
z-index: -1;
position: absolute;
}
If you set a fixed pixel margin on
#wrapperlike so:and remove the negative
margin-leftandmargin-topfrom#backgroundthis should not occur.