When I resize my window the background image also moves and gets resized, I dont want it to get resize, i want it to remain static. I am really confused how to keep my background static. If I set the width in pixels, then it remains static but that wont be good option as depending on different screen sizes
body {
background-color: #000000;
margin: 0 auto;
width: 100%;
}
#container {
background: url("url") no-repeat scroll center top transparent;
width: 100%;
}
The code is like:
<body>
<div id="container">
</div>
</body>
Try this code -
#container {
background: transparent url("url") 0 0 no-repeat;
width: 100%;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With