Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Fixed background image

Reply
Thread Tools

Fixed background image

 
 
Ioannis
Guest
Posts: n/a
 
      04-15-2005
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,
--
I. N. Galidakis
http://users.forthnet.gr/ath/jgal/
Eventually, _everything_ is understandable

 
Reply With Quote
 
 
 
 
Steve Pugh
Guest
Posts: n/a
 
      04-15-2005
"Ioannis" <(E-Mail Removed)> wrote:

>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

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <(E-Mail Removed)> <http://steve.pugh.net/>
 
Reply With Quote
 
 
 
 
Ioannis
Guest
Posts: n/a
 
      04-16-2005
Ο "Steve Pugh" <(E-Mail Removed)> έγραψε στο μήνυμα
news:(E-Mail Removed)...
>
> "Ioannis" <(E-Mail Removed)> wrote:
>
> >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.


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.

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


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.

> Steve
>
> --
> "My theories appal you, my heresies outrage you,
> I never answer letters and you don't like my tie." - The Doctor
>
> Steve Pugh <(E-Mail Removed)> <http://steve.pugh.net/>

--
I. N. Galidakis
http://users.forthnet.gr/ath/jgal/
Eventually, _everything_ is understandable

 
Reply With Quote
 
Arne
Guest
Posts: n/a
 
      04-16-2005
Once upon a time *Ioannis* wrote:

> Ο "Steve Pugh" <(E-Mail Removed)> έγραψε στο μήνυμα
> news:(E-Mail Removed)...
>>
>> "Ioannis" <(E-Mail Removed)> wrote:
>>
>> >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.

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

>
> 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.
 
Reply With Quote
 
Steve Pugh
Guest
Posts: n/a
 
      04-16-2005
"Ioannis" <(E-Mail Removed)> wrote:
>Ο "Steve Pugh" <(E-Mail Removed)> έγραψε στο μήνυμα
>news:(E-Mail Removed).. .
>> 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.


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.

>> "My theories appal you, my heresies outrage you,
>> I never answer letters and you don't like my tie." - The Doctor
>>
>> Steve Pugh <(E-Mail Removed)> <http://steve.pugh.net/>


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

--
"Reality must take precedence over public relations.
Nature cannot be fooled." - Richard Feynman

Steve Pugh <(E-Mail Removed)> <http://steve.pugh.net/>
 
Reply With Quote
 
Ioannis
Guest
Posts: n/a
 
      04-16-2005
Ο "Steve Pugh" <(E-Mail Removed)> έγραψε στο μήνυμα
news:(E-Mail Removed)...
>
> "Ioannis" <(E-Mail Removed)> wrote:
> >Ο "Steve Pugh" <(E-Mail Removed)> έγραψε στο μήνυμα
> >news:(E-Mail Removed).. .
> >> 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.

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

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


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.

> >> "My theories appal you, my heresies outrage you,
> >> I never answer letters and you don't like my tie." - The Doctor
> >>
> >> Steve Pugh <(E-Mail Removed)> <http://steve.pugh.net/>

>
> 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
>
> --
> "Reality must take precedence over public relations.
> Nature cannot be fooled." - Richard Feynman
>
> Steve Pugh <(E-Mail Removed)> <http://steve.pugh.net/>

--
I. N. Galidakis
http://users.forthnet.gr/ath/jgal/
Eventually, _everything_ is understandable

 
Reply With Quote
 
CEFM
Guest
Posts: n/a
 
      04-16-2005
> 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.


 
Reply With Quote
 
Lauri Raittila
Guest
Posts: n/a
 
      04-18-2005
in alt.html, Ioannis wrote:

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


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?

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Support me, buy Opera:
https://secure.bmtmicro.com/opera/bu...tml?AID=882173
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DIV background-repeat background-image? For shadow effect jc ASP .Net 3 03-19-2008 04:19 PM
DIV background-repeat background-image for shadowing effect jc HTML 1 03-19-2008 02:16 PM
Free Fixed-Width/Fixed-Pitch fonts? johnp HTML 4 05-23-2005 06:14 AM
Background image, fixed and resizeable, watermark. HELP. surjit Java 1 02-19-2004 08:32 PM
changing a background image to a background colour? Dj Frenzy Javascript 3 02-10-2004 08:08 PM



Advertisments