I have a DIV element with a background-image, and I want it to overflow outside the dimensions of the DIV (it now cuts off the image because the image is bigger than the DIV).
Is this possible? overflow:visible
doesn't work!
I have a DIV element with a background-image, and I want it to overflow outside the dimensions of the DIV (it now cuts off the image because the image is bigger than the DIV).
Is this possible? overflow:visible
doesn't work!
It is very possible with CSS3. I stumbled on this post while attempting this myself and discovered I could do it.
Here's the code I used:
Your images will layer down in the order you put them in. Your padding is the offset difference in size from your div.
I discovered this and just had to share it. Will not work in IE <9.
Put the background on a larger
<div>
that contains your<div>
.You can do it in alternative way: