[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

layers? - non-scrolling background

Posted on 1999-10-31
5
Medium Priority
?
214 Views
Last Modified: 2010-04-09
i just saw a really cool thing at www.hmmm.com (yes i was bored).. when you scroll the page down, the background image stays where it is... i think this uses layer but im not sure. i looked at the code and its ... whoa... complicated. can someone explain how to do this with an example (basically i wanna know how to use layers, and specifically how to do this.) ive never used div tags before so bear with me :)

daniel
0
Comment
Question by:th_c_man
  • 3
5 Comments
 
LVL 4

Accepted Solution

by:
oubelkas earned 800 total points
ID: 2173536
If you want the background image stay where it is, just use bgproperties="fixed" in the body tag.
So like they do it at www.hmmm.com :

<BODY background="../images/nice1.gif" bgproperties="fixed" link=blue>

background="../images/nice1.gif" is the image and the bgproperties="fixed" of course that link=blue is not of any importance with this issue.

J.
0
 
LVL 4

Expert Comment

by:oubelkas
ID: 2173550
OH, you want an example ?

<html>
<head>
<title> background fixed </title>
</head>

<body background="mypic.gif" bgproperties="fixed">

<center>scroll down and see what happens</center>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<center>The picture fixed on the background!</center>

</body>
</html>

The many <BR> tags are there to create a scrollbar. The <BR> tag is a break tag and outputs a hard return. Of course use an image you have instead of mypic.gif.

J.
0
 
LVL 3

Expert Comment

by:messentary
ID: 2174847
Note that this will only work in IE, not Netscape.
0
 
LVL 4

Expert Comment

by:oubelkas
ID: 2176363
Yes, that's true, it's not possible to do so in Netscape. But you viewed hmmm.com also in IE (or else you wouldn't have seen that the background stays fixed), so this must work for you!

J.
0
 

Author Comment

by:th_c_man
ID: 2178343
ok, thanx. sheesh! i thought it was gonna be a lot more complex than that! :)

thanx again
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
This article discusses four methods for overlaying images in a container on a web page
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

590 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question