Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Javascript Horizontal Scrolling

Options
  • 10-04-2005 2:54pm
    #1
    Closed Accounts Posts: 97 ✭✭


    Hey Guys,
    Im currently designing a new website, and my plan was to have one long horizontal page (kinda like http://www.plenderj.com/) but have it open in a fixed window etc so no matter what resolution you were at you dont see the surrounding pages. Im just wondering if its possible to have a javascript(or any other script for that matter) button that when pressed scrolls the page say 600px to the right? Cheers!


Comments

  • Moderators, Politics Moderators Posts: 39,933 Mod ✭✭✭✭Seth Brundle


    Why?
    Anyway, wouldn't something really long take an eternity to download on dial up?


  • Closed Accounts Posts: 97 ✭✭Jetpilot


    kbannon wrote:
    Why?
    Cause my website is gonna be based around artwork/music I create/compose, and I kinda wanna make a website thats I feel is a bit more creative.

    kbannon wrote:
    Anyway, wouldn't something really long take an eternity to download on dial up?

    Theres gonna be only 5 pages (contacts, music, blog, pictures, homepage), each mainly being text and links which wont make any major hit being loaded at once, plus the graphical background scheme I have is a pixel art one that compresses very well, in fact the one I am using is only 96.7k (when compressed as a j-peg) and its 4000x600 pixels, so i'd say I could keep the website under 150k, i'll just post a warning on the intro screen which I need to lauch the window with the main site!


  • Moderators, Politics Moderators Posts: 39,933 Mod ✭✭✭✭Seth Brundle


    fair enough.
    Anyway, you could use layers which are sized to utilise the full screen width.
    Without having tried it you could try the following:-
    1. Use JavaScript to find out the screen width.
    2. Set the width of layer 1 (page 1) to be the width of the screen. Set the width of layer 2 to be the width also but set its position to be say sceenwidth +1 (or whatever)
    then use this in a button or link
    onclick="JavaScript:window.scrollTo(200, 0);
    
    but replace the 200 with the width of your pages


Advertisement