View Full Version : Experiments With Scrolling Tricks Using Fixed BG - This Could Be So Cool, But...

11-24-2008, 08:50 PM
Take a look at this (http://joolzfx.com/test_area/fixed_bg_scroll/page-01.html), if you wouldn't mind.

I'm sure you can see how my mind is working and where I'm hoping to get with it, but it's something I coded from scratch and therefore done on guesswork alone.

Yes it's fraught with problems and limitations at the moment. The most obvious being a distinct 'rolling up' of the background, as the page scrolls. It's not so much been coded with authority, as poked into submission with constant changes, to get this far. I feel I could do with some guidance, in order to develop it into something I could use as part of my page design repertoire.

The basic premise of the design, is a background set OVER the content (as opposed to BEHIND it) with a simple hole cut out (via transparency) for the page to show through.

One of the main problems was in getting the entire paragraph to show... It kept getting cut off; as if the page was restricted somehow, in the amount that it would scroll, which wasn't enough. In some incarnations, as said, the background would literally 'roll up' and dissapear into itself, as the content scrolled, leaving me with the text hanging out of an incomplete background. How this could be so, I can't fathom. Any ideas? (If this doesn't make sense, I can force the problem back in, in order to demonstrate. Please let me know. It's an intriguing and unexpected fault.) This will probably only scroll for you, if browsed in a smaller window. In a maximized state, the scrolling effect is nulled completely, so the full text is unavailable to the viewer.

Edit: Setting HTML {height:200%} has just told me why the above happens. Still, I don't have a solution for taming it.

I don't imagine for one moment this is the best way of achieving the effect, though I would be very grateful for any pointers in the right direction, towards perfecting it.

I am also concerned about the wideness of browser support for fixed backgrounds and scrolling, in this manner. But as you can imagine, if this can be proven a goer, then I'm excited about the possibilities. I'd love to develop a site which could do this and hang together in all popular browsers and, as far as possible, remain resolution independant.

It would be absolutely perfect for building a gallery of my artwork, so I could have supporting text, which took up little space, among the pictures. I really don't like scrollbars invading the content area; for me, they belong on the outside edge of the browser. Otherwise, I'd have just used divs, with their overflow set to :auto;.

Many thanks


(Tested in FF4 and IE7).

11-24-2008, 10:02 PM
Not quite sure what you want, but this might be useful reading (http://bonrouge.com/~faq). Lower down there is stuff on fixed backgrounds.

How do you get your menu to stay fixed like that?
How do you get your background to stay fixed like that?

for instance.


11-24-2008, 10:18 PM
Hello Doctor_Varney,
Have a look at this: http://nopeople.com/Doctor_Varney/

I put it up on a test server because I edited the bg image.
As always, View Source to get the code if you want it.

11-24-2008, 10:21 PM
The height of your body extends after the content when it rolls up. You could try decreasing this or setting the width of your two margins less so that they would'nt do this.

11-24-2008, 11:13 PM
Hello Doctor_Varney,
Have a look at this: http://nopeople.com/Doctor_Varney/

I put it up on a test server because I edited the bg image.
As always, View Source to get the code if you want it.

Thank you, except the intented result is to eradicate scrollbars from the inside of the design; rather utilizing the main browser's bar only. Is this even possible, I wonder? I'll have to check the links at BonRouge, as Frank suggests...



11-24-2008, 11:15 PM
Here is a good example (http://www.csszengarden.com/?cssfile=202/202.css), I just found, at the Zen Garden. The CSS looks rather complex though. I was hoping it could be made simpler and also work for mutiple boxes...?


05-30-2009, 06:34 AM
Hi Doctor, how are your experiment?

I'm looking for the same thing, starting rght now.

Well, I'm think that javascript can observer the default browser scroll bar and use it only to scroll a determined div with overflow:scroll.

What do you think?

05-30-2009, 04:16 PM
FYI Firefox is only officially at version 3.0.10 but has a beta at version 3.5. Check out the fixed layouts here: http://www.cssplay.co.uk/

Its under layouts.