Web Design Advice Needed

The machines we love to hate

Moderator: Wiz Feinberg

User avatar
Jim Cohen
Posts: 21844
Joined: 18 Nov 1999 1:01 am
Location: Philadelphia, PA

Web Design Advice Needed

Post by Jim Cohen »

Can anyone show me the HTML needed to put a background image on a webpage. By this I mean an image that stays put while the scroll bar moves the text in front of it. A good example is Scotty's home page at http://www.scottysmusic.com
User avatar
Joey Ace
Posts: 9791
Joined: 11 Feb 2001 1:01 am
Location: Hamilton, Ontario, Canada

Post by Joey Ace »

Jim,
That feature only works for IE, other browsers scroll like it's not there.

The tag is
bgproperties="fixed"
in the body section.

It's difficult to see in Scotty's source code because his page appears to be made with an editor.

Look at the source code at www.JoeyAce.com

Since I code using a simple text editor it's easier to see.

I don't use that tag in my Photo Album sction, because it looks weird there. It's interesting to compare the two.<font size="1" color="#8e236b"><p align="center">[This message was edited by Joey Ace on 28 September 2005 at 12:43 PM.]</p></FONT>
User avatar
Will Holtz
Posts: 335
Joined: 5 Mar 2004 1:01 am
Location: San Francisco, California, USA

Post by Will Holtz »

To be compatible across the most browsers, you should use CSS to acomplish this.

<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">code:</font><HR><pre>
<HTML>
<HEAD>
<STYLE TYPE="text/css">
body {
background: white url(filename.jpg) fixed ;
color: black ;
}
</STYLE>
</HEAD>
<BODY>
</pre><HR></BLOCKQUOTE>
User avatar
Jim Cohen
Posts: 21844
Joined: 18 Nov 1999 1:01 am
Location: Philadelphia, PA

Post by Jim Cohen »

Thanks guys. Will, in your HTML is it important that the { and } be spaced out and separated on different lines from the text as in your post, or is that just an artefact of posting it here on the Forum?
User avatar
Will Holtz
Posts: 335
Joined: 5 Mar 2004 1:01 am
Location: San Francisco, California, USA

Post by Will Holtz »

That can all go on one line.
User avatar
Joey Ace
Posts: 9791
Joined: 11 Feb 2001 1:01 am
Location: Hamilton, Ontario, Canada

Post by Joey Ace »

Post a link when you get it working, Jim.

I didn't know that, Will. Thanks.
User avatar
b0b
Posts: 29079
Joined: 4 Aug 1998 11:00 pm
Location: Cloverdale, CA, USA

Post by b0b »

Here's a real nice demo of the technique: click this
User avatar
b0b
Posts: 29079
Joined: 4 Aug 1998 11:00 pm
Location: Cloverdale, CA, USA

Post by b0b »

Hey, I just did it to the Forum background!
User avatar
Wiz Feinberg
Posts: 6113
Joined: 8 Jan 1999 1:01 am
Location: Mid-Michigan, USA

Post by Wiz Feinberg »

Nice trick b0b! Looks neat.
User avatar
Jim Cohen
Posts: 21844
Joined: 18 Nov 1999 1:01 am
Location: Philadelphia, PA

Post by Jim Cohen »

Which page did you do it to, b0b? I thought I saw it here on this page a few days ago, but now I don't. Nor on other SGF pages I just checked... or perhaps it doesn't show on Mozilla?