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 17:40 PM 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 19:42 PM 08 Aug 09

click here

Might be of interest

  Chris the Ancient 19:49 PM 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 19:52 PM 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 19:56 PM 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 20:32 PM 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 22:53 PM 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 10:55 AM 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 12:31 PM 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 12:58 PM 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 13:00 PM 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.

How to get Windows 10 now: how to download and install Windows 10 even if GWX.exe is missing

Why Vodafone’s frequency choice should interest you: The benefits of 800MHz

Digital visionaries discuss Designing the Future

OS X Yosemite vs Windows 10: The Mac and PC operating systems go head to head UPDATED