PDA

View Full Version : formatting background?


pavid
07-24-2010, 01:06 PM
Hi there,

im looking to get my background image to fill the screen the whole time without stretching it.

this website does it really well, but its flash. you must be able to do it in css, but cant seem to think how...

http://www.yangli.eu/ (http://www.yangli.eu/portfolio/)

i can get it to be 100% height, so width changes, and 100% width so height changes.

any thoughts?

cheers

gentleone
07-24-2010, 02:18 PM
Here are some reads for you:
http://srobbin.com/blog/easy-full-screen-background-images-with-jquery/

http://buildinternet.com/2009/02/supersized-full-screen-backgroundslideshow-jquery-plugin/

pavid
07-24-2010, 02:43 PM
cheers!! appreciate it

pavid
07-26-2010, 09:33 PM
I just have a question that you may be able to answer...

I have a site i am making that requires multiple backgrounds on one page.

Only one background will appear at once and the others will appear when someone hovers over a link.

I have managed to do this with fixed divs as a background, but i would like to do it with what back stretch does.

Do you have any idea how i could do this?


Here is what I have tried, and it doesnt seem to work...



<script>
$(document).ready(function(){
$(".hover1").hover(function(){
$(".clear1").fadeOut("fast");
$(".ambra").fadeIn("fast");

});
});
</script>



<script type="text/javascript" class="home">
$.backstretch("_images/home.jpg");
</script>

<script type="text/javascript" class="ambra">
$.backstretch("_images/ambra.jpg");
</script>


if that makes any sense?

cheers

dave