Fixed background image

Discussion in 'HTML' started by Ioannis, Apr 15, 2005.

  1. Ioannis

    Ioannis Guest

    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
     
    Ioannis, Apr 15, 2005
    #1
    1. Advertising

  2. Ioannis

    Steve Pugh Guest

    "Ioannis" <> 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 <> <http://steve.pugh.net/>
     
    Steve Pugh, Apr 15, 2005
    #2
    1. Advertising

  3. Ioannis

    Ioannis Guest

    Ï "Steve Pugh" <> Ýãñáøå óôï ìÞíõìá
    news:...
    >
    > "Ioannis" <> 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 <> <http://steve.pugh.net/>

    --
    I. N. Galidakis
    http://users.forthnet.gr/ath/jgal/
    Eventually, _everything_ is understandable
     
    Ioannis, Apr 16, 2005
    #3
  4. Ioannis

    Arne Guest

    Once upon a time *Ioannis* wrote:

    > Ï "Steve Pugh" <> Ýãñáøå óôï ìÞíõìá
    > news:...
    >>
    >> "Ioannis" <> 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.
     
    Arne, Apr 16, 2005
    #4
  5. Ioannis

    Steve Pugh Guest

    "Ioannis" <> wrote:
    >Ï "Steve Pugh" <> Ýãñáøå óôï ìÞíõìá
    >news:...
    >> 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 <> <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 <> <http://steve.pugh.net/>
     
    Steve Pugh, Apr 16, 2005
    #5
  6. Ioannis

    Ioannis Guest

    Ï "Steve Pugh" <> Ýãñáøå óôï ìÞíõìá
    news:...
    >
    > "Ioannis" <> wrote:
    > >Ï "Steve Pugh" <> Ýãñáøå óôï ìÞíõìá
    > >news:...
    > >> 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 <> <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 <> <http://steve.pugh.net/>

    --
    I. N. Galidakis
    http://users.forthnet.gr/ath/jgal/
    Eventually, _everything_ is understandable
     
    Ioannis, Apr 16, 2005
    #6
  7. Ioannis

    CEFM Guest

    > 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.
     
    CEFM, Apr 16, 2005
    #7
  8. 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/buy-opera.html?AID=882173
     
    Lauri Raittila, Apr 18, 2005
    #8
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. surjit
    Replies:
    1
    Views:
    500
    kaeli
    Feb 19, 2004
  2. johnp
    Replies:
    4
    Views:
    3,675
    Toby Inkster
    May 23, 2005
  3. jc
    Replies:
    3
    Views:
    1,735
  4. jc
    Replies:
    1
    Views:
    1,373
    Neredbojias
    Mar 19, 2008
  5. Dj Frenzy
    Replies:
    3
    Views:
    313
    Robert
    Feb 10, 2004
Loading...

Share This Page