PDA

View Full Version : Help with my background picture in webpage



Lfernandez79@gmail.com
06-27-2007, 09:22 PM
hi guys,
I have a question, i have a picture as a background in my web page and of course infomation in my web page, I want to be able to freeze or whatever its call the background picture, so if I want to see more info and i need to scroll down my web page, I want to see the background be stable, not moving, only the info. Do you know How to do this? or Am I crazy and I'm not making myself clear enogh?

thank you

Collectors-info
06-28-2007, 06:55 AM
Hi, try pasting the code below into the body of your page with your image URL. IE: replace this part: http://www.yoursite.com/yourimage.jpg

Good luck.




<script language="JavaScript1.2">
if (document.all||document.getElementById)
document.body.style.background="url('http://www.yoursite.com/yourimage.jpg') white center no-repeat fixed"

</script>

Lfernandez79@gmail.com
06-28-2007, 05:08 PM
Hi,
Thank you very much for the code, you know I haven't upload my webpage becouse its not ready yet, do you think I would have any problem pasting the code or should I wait until I upload it to the net.


Hi, try pasting the code below into the body of your page with your image URL. IE: replace this part: http://www.yoursite.com/yourimage.jpg

Good luck.




<script language="JavaScript1.2">
if (document.all||document.getElementById)
document.body.style.background="url('http://www.yoursite.com/yourimage.jpg') white center no-repeat fixed"

</script>

Collectors-info
06-28-2007, 08:29 PM
Hi, i was playing with this earlier at the link below.
http://www.collectors-info.com/testing/static-background-image-on-scroll.html
If nothing else, it might be worth putting the image up to your server. You will then be able to see how it looks in preview mode as you are making up your pages.
One thing I forgot! At the end of the script there is a </script> . Leave out the last chevron as it will show up in the head of your page. BV will compensate for this.
Last part will look like </script

Good luck.

Lfernandez79@gmail.com
06-28-2007, 09:12 PM
Thank you very much for you help, I'll let you know how it looks when its done.

navaldesign
06-28-2007, 09:47 PM
If your image is bieg enough or you don't mind repetition, it might be acheived in a simple way. Copy this code in the inside body tag of your page html:
bgproperties="fixed"

However, this will not work in some browsers (IE and Opera are ok, FF is not)

Lfernandez79@gmail.com
06-29-2007, 12:48 AM
What you mean? Are trying to say that I should put "bgproperties="fixed"[/quote] into a html box and post it on my page?


It might be acheived in a simple way. Copy this code in the inside body tag of your page html:

bgproperties="fixed"