Forum Moderators: not2easy

Message Too Old, No Replies

background positioning

         

kristian nissen

8:21 am on Sep 23, 2008 (gmt 0)

10+ Year Member



hi, how can I make my background image visible outside of a div tags viewport?

here is an example <snip>

I want the background image to be visible outside of the wrapper div, until now I have been using nested divs with negative margins, but that solution is buggy... I think. Is there any other option?

Have a look at the background image <snip> it contains spatter and the spatter has to be visible outside of the div tags viewport.

[edited by: engine at 9:02 am (utc) on Sep. 23, 2008]
[edit reason] Please see CSS Charter [/edit]

kristian nissen

10:26 am on Sep 23, 2008 (gmt 0)

10+ Year Member



this is the code:

<html>
<head>
<style type="text/css">
#wrapper {
background-image: url(bgBannerSpace.gif);
background-repeat: no-repeat;
background-position: -20px -20px;
width: 350px;
height: 200px;
border: 1px solid black;
}
</style>
</head>
<body>

<div id="wrapper">Min wrapper med et stort baggrundsbillede</div>

</body>
</html>

SuzyUK

7:24 pm on Sep 28, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



one solution is not to have the image as a background to that div, but instead to have the image as the html or body (usually body) background, them two being the natural viewport containers.. if they are already in use, you might need to make another container element, to contain the whole content