Give help. Get help.

  • # September 25, 2008 at 1:52 am

    Can anyone please point me in the right direction to a tutorial, or info on how to achieve the scrolling foreground effect, with the transparent elements like on the Paul Wallace site:


    # September 25, 2008 at 6:42 am


    The background image effect was achieved by adding: "background:url(images/bg.jpg) top center fixed no-repeat;" to his css. The "fixed" position indicates that the background is static.

    The content boxes simply have a transparent background on them along with what seems to be another layer on top that was probably filled-black and had it’s opacity lowered (these two layers are part of the image… no css was used). It was then saved as .png which uses alpha transparency to make it look all shiny, but unfortunately isn’t really supported by ie that well – ie7 is alright at it, but ie6 sucks.

    Anyways, that’s what it looks like to me. Hope this helps.

    # November 25, 2008 at 6:40 am


    I have another solution. Not by CSS but by using javascripting. When used, it places an image in your background. And no matter the size of your windoe, it will fill it up.

    First create a file like "fixedbackground.js" by using notepad or any other editor. This file should contain:

    var backgroundset = false;
    function fixedBackground(url) {
    if(!backgroundset) { = ‘hidden’; = ‘0px’; = ‘0px’;
    var overlay = document.createElement(‘DIV’); = ‘absolute’; = ‘0px’; = ‘0px’; = ‘100%’; = ‘100%’; = ‘auto’;
    overlay.innerHTML = document.body.innerHTML;
    document.body.innerHTML = ‘‘;
    backgroundset = true;
    else background.src = url;

    Next, in the head section of your htm-file (or asp, or php, or whatever), place the followoing code:


    In your htm-file (or whatever), your body-tag should contain an onload like:

    onload=”fixedBackground(‘background.JPG’); (any other image-file will do)

    That’s it.

    If you are using frames, you have to do this for every document in that frame. That’s a lot of work because you have to cut up your image in images for every frame you use.
    If you change to iframes, then it is a lot easier. Every line for a iframe should contain "allowtransparency" like:


    Every document loaded in the iframe needs some extra coding to. In the head-section you need:


    Don’t assign any background in you body-section!

    If you wan’t to see an example, visit Play around with the window and see the effect.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.