JKG Posted April 28, 2011 Share Posted April 28, 2011 hi just a shot in the dark, any way that you know of to apply the overflow:visible rule to the background image aswell? :/ thanks! Quote Link to comment https://forums.phpfreaks.com/topic/234976-background-overflowvisible/ Share on other sites More sharing options...
cssfreakie Posted April 28, 2011 Share Posted April 28, 2011 if you have a background image it's the property of the container. (for instance a div with a background) What exactly are you trying to achieve? Quote Link to comment https://forums.phpfreaks.com/topic/234976-background-overflowvisible/#findComment-1207559 Share on other sites More sharing options...
JKG Posted April 28, 2011 Author Share Posted April 28, 2011 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 Quote Link to comment https://forums.phpfreaks.com/topic/234976-background-overflowvisible/#findComment-1207564 Share on other sites More sharing options...
cssfreakie Posted April 28, 2011 Share Posted April 28, 2011 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? Quote Link to comment https://forums.phpfreaks.com/topic/234976-background-overflowvisible/#findComment-1207572 Share on other sites More sharing options...
JKG Posted April 28, 2011 Author Share Posted April 28, 2011 ah yeah, good idea. will that screw up the centering though? EDIT: link now taken down. Quote Link to comment https://forums.phpfreaks.com/topic/234976-background-overflowvisible/#findComment-1207575 Share on other sites More sharing options...
cssfreakie Posted April 28, 2011 Share Posted April 28, 2011 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 Quote Link to comment https://forums.phpfreaks.com/topic/234976-background-overflowvisible/#findComment-1207578 Share on other sites More sharing options...
JKG Posted April 28, 2011 Author Share Posted April 28, 2011 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. thanks though cssfreakie! Quote Link to comment https://forums.phpfreaks.com/topic/234976-background-overflowvisible/#findComment-1207584 Share on other sites More sharing options...
cssfreakie Posted April 28, 2011 Share Posted April 28, 2011 no problem! Don't forget to mark the topic solved we love the green color of it out here Quote Link to comment https://forums.phpfreaks.com/topic/234976-background-overflowvisible/#findComment-1207591 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.