Fixed background image

I

Ioannis

I've edited my pages, which have been initially built with Netscape
Composer, to contain the command:
bgproperties="fixed", as follows:

<body
style="color: rgb(0, 255, 0); background-color: rgb(0, 0, 0);
background-image: url(../chaos.gif);"
bgproperties="fixed" link="#ff0000" vlink="#0000ff" alink="#ff00ff">

in order to scroll only the text and leave the background image immovable.
This seems to work only with IE, but not with my Netscape 7.1.

Does anyone know how I should change the above body command so it works with
both IE and Netscape?

Thanks much in advance,
 
S

Steve Pugh

Ioannis said:
I've edited my pages, which have been initially built with Netscape
Composer, to contain the command:
bgproperties="fixed", as follows:

There's no such attribute (and there are no commands in HTML). Check
the HTML spec if in any doubt.
<body
style="color: rgb(0, 255, 0); background-color: rgb(0, 0, 0);
background-image: url(../chaos.gif);"
bgproperties="fixed" link="#ff0000" vlink="#0000ff" alink="#ff00ff">

What an odd mixture of CSS and presentational HTML.

Black background, green text, red links, blue visited links. Hmmm.
in order to scroll only the text and leave the background image immovable.
This seems to work only with IE, but not with my Netscape 7.1.

Use the CSS background-attachment property.
Does anyone know how I should change the above body command so it works with
both IE and Netscape?

In your stylesheet:
body {
background: rgb(0,0,0) url(../chaos.gif) fixed;
color: rgb(0,255,0);
}
a:link {color: rgb(255,0,0); background: transparent;}
a:visited {color: rgb(0,0,255); background: transparent;}
a:active {color: rgb(255,0,255); background: transparent;}

and then your HTML is just:
<body>

Steve
 
I

Ioannis

Ï "Steve Pugh said:
There's no such attribute (and there are no commands in HTML). Check
the HTML spec if in any doubt.


What an odd mixture of CSS and presentational HTML.

It's not mine. It's the way Netscape Composer creates pages.
Black background, green text, red links, blue visited links. Hmmm.

I actually decided on this format long before Matrix came out.
Use the CSS background-attachment property.


In your stylesheet:
body {
background: rgb(0,0,0) url(../chaos.gif) fixed;
color: rgb(0,255,0);
}
a:link {color: rgb(255,0,0); background: transparent;}
a:visited {color: rgb(0,0,255); background: transparent;}
a:active {color: rgb(255,0,255); background: transparent;}

and then your HTML is just:
<body>

I don't want to use style sheets. Pardon my infinite ignorance, but is there
a way to fix it inline, i.e. insert the appropriate command into the main
pages?
I tried:
<body background="../chaos.gif" bgproperties="fixed" text="#00ff00"
link="#ff0000" alink="#ff00ff"
vlink="#0000ff" bgcolor="#000000">

but it still works only in IE and not in Netscape.

Thanks again.
 
A

Arne

Once said:
It's not mine. It's the way Netscape Composer creates pages.


I actually decided on this format long before Matrix came out.


I don't want to use style sheets. Pardon my infinite ignorance, but is there
a way to fix it inline, i.e. insert the appropriate command into the main
pages?
I tried:
<body background="../chaos.gif" bgproperties="fixed" text="#00ff00"
link="#ff0000" alink="#ff00ff"
vlink="#0000ff" bgcolor="#000000">

but it still works only in IE and not in Netscape.

Because it's a MSIE only extension. If you want it to work in other
browsers you must use style sheets (CSS). And you can use it inline
like this:

<body style="background: rgb(0,0,0) url(../chaos.gif) fixed; color:
rgb(0,255,0);">

But you can also put the styles Steve suggested within <head> and
</head> on the page like this.

<style type="text/css">
body {background: rgb(0,0,0) url(../chaos.gif) fixed; color:
rgb(0,255,0);}
a:link {color: rgb(255,0,0); background: transparent;}
a:visited {color: rgb(0,0,255); background: transparent;}
a:active {color: rgb(255,0,255); background: transparent;}
</style>

and have a "clean" <body> tag after. What's the problem with that, and
why would you not like to use it? :)

--
/Arne

Top posters will be ignored. Quote the part you
are replying to, no more and no less! And don't
quote signatures, thank you.
 
S

Steve Pugh

Ioannis said:
I don't want to use style sheets.

Why not? What you want can not be done without stylesheets.
Pardon my infinite ignorance, but is there
a way to fix it inline, i.e. insert the appropriate command into the main
pages?

There are no commands in HTML.

If you want to put the stylesheet inline then you can:

<body style="background: rgb(0,0,0) url(../chaos.gif) fixed; color:
rgb(0,255,0);">

But that's less effeicent than an external stylesheet if you have more
than one page.
I tried:
<body background="../chaos.gif" bgproperties="fixed" text="#00ff00"
link="#ff0000" alink="#ff00ff"
vlink="#0000ff" bgcolor="#000000">

but it still works only in IE and not in Netscape.

Of course. It's exactly the same as your previous effort except that
you've gone backwards and moved the parts that do work out of CSS and
into HTML.

The parts that didn't work still won't work just because you've
changed something else. If you want a non-scrolling background in
anything other than IE you must use CSS.

I realise that you probably enjoy the wit and wisdom contained in my
sigs, but there's really no need to quote them. In fact a decent
newsreader would have trimmed them from your reply automatically.

Steve
 
I

Ioannis

Ï "Steve Pugh said:
Why not? What you want can not be done without stylesheets.

Understood. My webpage contains over 200 pages and although I think I
understand that a style sheet would be more efficient as it would be
referenced for all pages, it still would require me to edit all the pages to
remove the unneeded info and re-upload them. My webpage is 7 megs total and
this is somewhat of a nuisance.
There are no commands in HTML.

If you want to put the stylesheet inline then you can:

<body style="background: rgb(0,0,0) url(../chaos.gif) fixed; color:
rgb(0,255,0);">

But that's less effeicent than an external stylesheet if you have more
than one page.


Of course. It's exactly the same as your previous effort except that
you've gone backwards and moved the parts that do work out of CSS and
into HTML.

The parts that didn't work still won't work just because you've
changed something else. If you want a non-scrolling background in
anything other than IE you must use CSS.

Thanks. Your code and Arne's work ok with Netscape, inline with the style
thing. I think I will only do that for my main thumbnail pages and leave the
rest as they are.

Again, many thanks.
 
C

CEFM

I don't want to use style sheets. Pardon my infinite ignorance, but is
there
a way to fix it inline, i.e. insert the appropriate command into the main
pages?

** Try this then:

** Between the <HEAD> tags add.

<style type="text/css">
<!--
..stillbkg {
background-attachment: fixed;
background-image: url(../chaos.gif);
background-repeat: no-repeat;
background-position: center center;
background-color: #000000;
color: #00FF00;
}
-->
</style>

** Then Change your body tag to

<body class="stillbkg" link="#ff0000" vlink="#0000ff" alink="#ff00ff">

** This puts the CSS embedded in the page, so you get the same funcionaliy
of the CSS without the seperate file.
 
L

Lauri Raittila

Understood. My webpage contains over 200 pages and although I think I
understand that a style sheet would be more efficient as it would be
referenced for all pages, it still would require me to edit all the pages to
remove the unneeded info and re-upload them. My webpage is 7 megs total and
this is somewhat of a nuisance.

You could make server have stylesheet header. Don't know if it works
though.

Anyway, how do you think you would make use of inline thingy instead of
stylesheet without replacing old pages?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top