Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Javascript Horizontal Scrolling

  • 10-04-2005 02: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, Paid Member Posts: 44,249 Mod ✭✭✭✭Seth Brundle


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

    Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/ .



  • 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, Paid Member Posts: 44,249 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

    Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/ .



Advertisement