Results 1 to 8 of 8

Thread: How to keep background stationary
      
   

  1. #1
    coffee4uandme's Avatar
    coffee4uandme is offline Second Lieutenant
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    145

    Question How to keep background stationary

    While looking around in this forum, I found some web pages with a stationary background and the web page itself can move up and down with the scroll bar... What is the trick to this?
    Or direct me to a sticky

    Randall

  2. #2
    Tom vR's Avatar
    Tom vR is offline Brigadier General
    Join Date
    Apr 2007
    Location
    Centurion, South Africa
    Posts
    1,733

    Default Re: How to keep background stationary

    Experiment with I-Frames.. Here is the link.
    Menubar in I-frame

  3. #3
    Join Date
    Feb 2006
    Location
    Earth
    Posts
    8,721

    Default Re: How to keep background stationary

    Hi, try pasting this code below into the “Beginning of Body” in your page properties & replace my url image link with your own.

    HTML Code:
    <script language="JavaScript1.2">
    if (document.all||document.getElementById)
    document.body.style.background="url('http://www.collectors-info.com/Collector-bird-jackdoor.gif') white center no-repeat fixed"
    
    </script>

    Good luck.

  4. #4
    Tom vR's Avatar
    Tom vR is offline Brigadier General
    Join Date
    Apr 2007
    Location
    Centurion, South Africa
    Posts
    1,733

    Default Re: How to keep background stationary

    Hi Chris,

    Where can I see the effect of this code on your website? I went to your site, but cannot see where you have used it. The code seems very intersting. Many thanks.

  5. #5
    Join Date
    Feb 2006
    Location
    Earth
    Posts
    8,721

    Default Re: How to keep background stationary

    Hi Tom, I need to check this script? It seems to be fine in Fire fox, but wont center on my machine using IE. Maybe you can confer if this is right on this link. http://www.collectors-info.com/testi...on-scroll.html
    The text should be dead center of screen.
    I have been having a few browser issues lately so it maybe just my machine.

    But if its ok on yours? Just follow the instructions above & then put text on the page as normal & you will see the effect. Remember to make the page about 1000 long so you have some scroll & place the text down at the 900 mark to see how it works as a test.

  6. #6
    Tom vR's Avatar
    Tom vR is offline Brigadier General
    Join Date
    Apr 2007
    Location
    Centurion, South Africa
    Posts
    1,733

    Default Re: How to keep background stationary

    Thanks Chris, it works perfectly. Is there a way that you can make the header area stationary while you can scroll for the rest of the page using code? You can achive this using iframes, but is there another way?

  7. #7
    Join Date
    Feb 2006
    Location
    Earth
    Posts
    8,721

    Default Re: How to keep background stationary

    Yes you can! But only with iframes as a simple way with BV. Or at this link. http://www.dynamicdrive.com/style/layouts/category/C11 This will involve starting on the HTML/CSS lessons. Lol. One day I might try.



    This is also set up as self expanding page lengths.

  8. #8
    Bethers's Avatar
    Bethers is offline Major General & Forum Moderator
    Join Date
    Feb 2006
    Posts
    5,232

    Default Re: How to keep background stationary

    Be very careful about using iframes if you want to make sure all people will see it correctly - and if you want to be sure that the se's will read it correctly as from the page it's on.

    They have uses - as images do - but for most of your text, it's still not the best way to go.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49