Jump to content

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 :)

thanks!

ill remember the even pixel thang. :)

read about problems with that here last week, was interesting:

http://bjango.com/articles/pixelrotation/

 

i have gone with just applying a gradient to true black on the right hand side. :P

thanks though cssfreakie!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.