I was trying to make a div fill a certain part of the screen, leaving 412px empty both to the left and to the right. Easy, eh?
Now, when I add position:absolute & top:0, the fill disappears. The element inspector shows it's empty - the "paddings" stay, but the width:100% disappears. I've used this code (without the positioning):
<div style="height:73px; padding-left:413px; padding-right:413px;">
<div style="width:100%; height:73px; background:url(top-fill-small.png);">
</div>
</div>
So, how can I position it absolutely (I need it animated later), while preserving the padding? I'd love your help very much. Thanks in advance!
Perhaps this?
<div style="width:100%; position:absolute; top:0; left:0">
<div style="height:73px; background:url(top-fill-small.png); margin-left:413px; margin-right:413px"></div>
</div>
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