to keep a fixed background during scrolling.It works fine in IE... but not in Firefox.Is..."> to keep a fixed background during scrolling.It works fine in IE... but not in Firefox.Is..."> to keep a fixed background during scrolling.It works fine in IE... but not in Firefox.Is...">

Help on backgrounds... sort of!

  Chris the Ancient 08 Aug 09
Locked

Once upon a time, I created a web site using the code...

BODY BGPROPERTIES="fixed" BACKGROUND="bground.jpg">

to keep a fixed background during scrolling.

It works fine in IE... but not in Firefox.

Is there a way of making it work in other explorers apart form IE?

  OTT_Buzzard 08 Aug 09

click here

Might be of interest

  Chris the Ancient 08 Aug 09

Interesting link with some ideas to improve the site under development.

But... no mention of a "fixed" background that I could find. :-(

  Chris the Ancient 08 Aug 09

You were entering that as I was replying to OTT_Buzzard.

That looks interesting. Quite a different syntax. I will try it tomorrow, when I'm back in 'design mode' and see if it will work in Firefox.

  OTT_Buzzard 08 Aug 09

The upshot is that the Body & Background syntax is no longer supported - use of CSS is the way forward.

  Chris the Ancient 08 Aug 09

CSS is, fortunately, the way I was going forward. However, I shall continue to experiment; it's one of the ways that I learn (sometimes) and see if I can wangle a fixed background into it.

  Chris the Ancient 08 Aug 09

I was hoping that would be the case. I'll try it inline first, and if it works I'll put it in the CSS.

Back tomorrow.

  Chris the Ancient 09 Aug 09

More detail...

Developing these ideas using DreamWeaver 4 (I know it's old; but it's all I've got!).

For now, I have created a very simple page with enough stuff on it to need scrolling.

Using DW4, I have modified the CSS Style for body (inline style) and it reads...

<style type="text/css">
<!--
body { background-attachment: fixed; background-image: url(/backgrounds/Background.jpg) }
-->
</style>

Unlike a solid colour, this just not show on the development page. Using the 'preview' facility for both IE and FF, the background shows and stays put. Yippee!

Save it, close it and view it (properly) in IE or FF and no background.

Gulp.

Help!

  Chris the Ancient 09 Aug 09

Tried varying combinations on that line - and different images.

Also tried using a style.css - and that didn't work either.

I'm going to try reloading DW4 (after a desperately needed smoke break... naughty) in case there is a little glitch in it; though I doubt it. That'll pass a bit of time until lunch break.

  OTT_Buzzard 09 Aug 09

Put <style type="text/css"> inside the <header> </header> tags at the top of the page.

Worth noting that you've got 'note' qualifiers around the body style as well, so get rid of the <!-- and -->

Also between the <header> tags, use:

body
{
background-image:url('yourimage.jpg');
background-repeat:no-repeat;
}

I don't know if 'fixed' is supported, but if it is then try:

body
{
background-image:url('yourimage.jpg');
background-repeat:no-repeat;
background-attachment: fixed;
}


Haven't tried it - hope it works for you!

  OTT_Buzzard 09 Aug 09

forgot a bit:

At the end of the style section (and still within the <header> tags, you need to close it off with </style>

Advertisement

This thread is now locked and can not be replied to.

Should I upgrade to Windows 10? 8 reasons why you should upgrade to Windows 10... and 2 why you…

We are being sold the ability to spend money we don't have. And we love it

Encore creates eerie effects for Spielberg's new TV show The Whispers

How to set up Apple Music & make sure you don't get charged: Get Apple Music for free

We use cookies to provide you with a better experience. If you continue to use this site, we'll assume you're happy with this. Alternatively, click here to find out how to manage these cookies

hide cookie message