...

View Full Version : background stays while rest of info moves



ImperialSpider
02-01-2005, 04:22 AM
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

_Aerospace_Eng_
02-01-2005, 04:46 AM
this is how u would do it

<!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>

ImperialSpider
02-01-2005, 05:00 AM
Thank you very much.

ImperialSpider
02-01-2005, 07:03 AM
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

_Aerospace_Eng_
02-01-2005, 07:16 AM
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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum