Background image help (Solved)

Posted by J2 on Stack Overflow See other posts from Stack Overflow or by J2
Published on 2010-04-26T20:14:09Z Indexed on 2010/04/27 11:03 UTC
Read the original article Hit count: 327

Filed under:
|

thanks for help, ended up with this

html{ position:relative; min-width:950px; height:100%; background:black url(images/GrassBG.png) repeat-y top center;

font:13px "Lucida Grande",Helvetica,Arial,sans-serif;
}

body.main{ width:950px; margin:0 auto; position:relative; }


is there any way when using a div for a background image- to limit the height to only the content displayed?

im putting the background image in a div because i want it centered via position:relative but the image doesnt show up unless i put a height on the div, and thats not what i want because i dont want to be able to just scroll down to the bottom of the image where theres no content

ive tried putting the background image on the body css but if the browser is less than the width of the image, it just throws it over to the left and you can only see half of it- is there no way to make the background position:relative on the body?

sorry if that doesnt make sense ><

thanks

why can you not use Position:relative; on the body?

© Stack Overflow or respective owner

Related posts about html

Related posts about css