Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Jan 2004
    Location
    San Antonio, TX
    Posts
    131
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Unhappy background stays while rest of info moves

    I have seen this before, but not sure how it is done...
    How do you make a website where the background is an image, but the background image does not move. The website words, and pictures move with the scroll bar, but not the background image. What I am wanting is a background image that is an animated gif (shining stars). Can someone help me with this? Here is the code I have so far...I only want the stars to be the background, and not in the other frames where the documents go.
    code:

    <html>
    <head>
    <title>The 411 on everything</title>
    <body>
    <script language="JavaScript">

    if (document.all||document.getElementById)
    document.body.style.background="url('http://www.webpage.com/stars.gif') tiled repeat fixed"

    </script>
    <center>
    <table border="0" width="85%">
    <tr>
    <td><img src="joe.jpg" height="160px" width="150px"></td>
    <td> </td>
    <td><img src="frank.jpg" height="160px" width="150px"></td>
    <td> <td>
    <td><img src="eric.jpg" height="160px" width="150px"></td>
    <td> <td>
    <td><iframe src="http://www.webpage.com/doc1.doc" width=160 height=140></iframe></td>
    </tr>
    </table>
    <p>
    We got the 411. Givin' ya info that you wanna know about.<br>
    <table>
    <tr>
    <td>
    <iframe src="http://www.webpage.com/doc2.doc" width=450 height=300></iframe>
    <TD>Navigation<br>
    <iframe src="http://www.webpage.com/page3.html" width=150 height=200></iframe></td>
    </tr>
    </table>
    <p>
    </body>
    </head>
    </html>

    Please help. Thanks,
    Imperial Spider
    Last edited by ImperialSpider; 02-01-2005 at 04:44 AM.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    this is how u would do it
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>The 411 on everything</title>
    <style type="text/css">
    body {
    background-image:url(http://www.webpage.com/stars.gif);
    background-attachment:fixed;
    }
    </style>
    </head>
    <body>
    <center>
    <table border="0" width="85%">
    <tr>
    <td><img src="joe.jpg" height="160px" width="150px"></td>
    <td> </td>
    <td><img src="frank.jpg" height="160px" width="150px"></td>
    <td> <td>
    <td><img src="eric.jpg" height="160px" width="150px"></td>
    <td> <td>
    <td><iframe src="http://www.webpage.com/doc1.doc" width=160 height=140></iframe></td>
    </tr>
    </table>
    <p>
    We got the 411. Givin' ya info that you wanna know about.<br>
    <table>
    <tr>
    <td>
    <iframe src="http://www.webpage.com/doc2.doc" width=450 height=300></iframe>
    <TD>Navigation<br>
    <iframe src="http://www.webpage.com/page3.html" width=150 height=200></iframe></td>
    </tr>
    </table>
    <p>
    </body>
    </html>

  • #3
    Regular Coder
    Join Date
    Jan 2004
    Location
    San Antonio, TX
    Posts
    131
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Thumbs up it worked.

    Thank you very much.

  • #4
    Regular Coder
    Join Date
    Jan 2004
    Location
    San Antonio, TX
    Posts
    131
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question new help with same script

    I am wanting to now protect the documents I have written. in the above code. here is the snippit I am talking about this time...

    <td><iframe src="http://www.webpage.com/doc1.doc" width=160 height=140></iframe></td>

    I want this page ("http://www.webpage.com/doc1.doc") to be protected from any changes by making it a "readonly" document...how do I do this?


    Please help with this, its driving me nuts...

    Thanks,

    Imperial Spider

  • #5
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    hmm i dunno how well this will work, but with the file on your computer right click it and go to properties, u will have the option to make it read only but i think if somone where to save the file to their own computer they could just take the read only off, im not even sure how well the read only will work in the browser, but they shouldn't be able to edit in the browser any ways, it may appear that it is editable but they wont be able to save it on your server


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •