Jump to content

background overflow:visible


JKG

Recommended Posts

yeah, thats pretty much it, i want my centered container div with a background image to start top left of the div, which it does, but then just continue beyond the 960px, cos there is a very subtle background which looks funny when it just stops.

 

http://jkgo.co.uk/e

ah i see, well what you could do is set a padding to that container so the content stays in the same place but the background can grow a bit.

since you have a container of 960px and an image of 991px; you can try to give it a padding of 15px left and right. You miss 1 px though It's always better to work with even numbers :)

 

it could look like this:

 

#container {
    background: url("../images/structure/yorkshire-media-background-image.jpg") no-repeat scroll left top transparent;
    height: auto !important;
    margin-left: auto;
    margin-right: auto;
    min-height: 500px;
    overflow: visible;
    padding: 0 15px; /* added this */
    position: relative;
    top: 10px;
    width: 960px;
}

is that what you want or is it another scenario?

nope it won't screw up the centering.

you gave it a margin: 0 auto;

 

But what i would do is make that image an even number for instance 990 or 992

since pixels can't be split in to two. (always work with even numbers when using pixels :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.