Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DIV background-image overflow

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!

like image 992
Jeroen Avatar asked Dec 16 '22 15:12

Jeroen


2 Answers

You can do it in alternative way:

#box {
    margin:-50px 0 0;
    padding:50px 0 0 0;
    background:url(/images/image.png) no-repeat;
}
like image 108
vaxxis Avatar answered Mar 23 '23 03:03

vaxxis


Put the background on a larger <div> that contains your <div>.

like image 35
SLaks Avatar answered Mar 23 '23 05:03

SLaks