View Full Version : Background
zoobie
12-14-2002, 03:53 AM
I have a nice background with width=780 height=543 which I'd like to use for the whole page without repeating. Is there a way to have the bg stretch with availWidth & availHeight to fit all resolutions?
Thanks :D
I'm not sure if u can do that but most of the bg controlls u can use with css are good.
or u could make the image a layer and make the width & height 100% I dunno..
just an Idea...:confused:
maby this would work:
<style>
body {
background:url(image.gif);
background-position:100%;
}
</style>
but I think it only works in IE5+ not netscape...not sure
so I guess this goes in the html&CSS forum :D
zoobie
12-14-2002, 06:24 AM
Nope...I've run the course with css using it all. I think it's gonna havta be js.
background-position:100%;
...leaves a quarter inch on the right 'cause it's not stretching the bg...just positioning it.
I've even tried background-size:100% which is supposed to stretch it...nuttin' :confused:
I tried it with the coed u had there and it did exactly what u said. so removed the background-repeat: nor-repeat; and it worked fine . maby it is cuz u are useing a jpg I used a gif
<body style="background:url(black.gif);background-position:100% 100%;" >
I don't know how to do what u need in javascript. so sorry I can't be a better help
zoobie
12-14-2002, 08:03 AM
Originally posted by [m]
I removed the background-repeat: no-repeat; and it worked fine . maby it is cuz u are useing a jpg I used a gif
Umm...It's just tiling that way.
Otherwise you could use a layer and set the z value to -1 (so it's behind everything else) and then use <img src="blah" width="x" height="y"> where x and y are set by JavaScript.
Maybe someone could figure this snippet out.
I've decided to enlargen my bg image to 800 x 600 and add overflow:hidden which works fine...but I don't think css2 has addressed this issue of stretching backgrounds so we're stuck with js.
Thanks :D
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.