Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,642
    Thanks
    6
    Thanked 1,005 Times in 978 Posts

    scroll content in a div without scrollbar

    There is a script that serves my purposes like it was made for me.
    However, the still appearing scrollbar is disturbing me (which results from overflow: auto; in the stylsheet) and when I set the overflow to hidden it stops working in Opera and Netscape 7 (I don't yet know at all how it works on Mac). It is working in IE and Firefox, which is good but not enough for my demands.

    Can you give me a hint on how to make it work with overflow: hidden; or can you show me a better script?

    Thanks in advance.

  • #2
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    Whatever you do, please check the results with a scroll mouse.

    / was just irritated to HELL by a couple pages that thought they were being cool and made me sit there with the !@$$ mouse over a stupid link when I use my scroll button 99.9% of the time
    // grrrrrrrrr

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #3
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,642
    Thanks
    6
    Thanked 1,005 Times in 978 Posts
    Sorry, I'm not quite sure what you are talking about...
    Even if the user would use the scrolling wheel on his/her mouse there isn't any reason to be irritated... And in what I'm trying to achieve (overflow: hidden; ) the scrolling wheel doesn't do anything anyway.
    Could someone please give me some more constructive advice on this?
    This (temporary link) is what I currently have and what I'd like to have working in Opera and Netscape 7 too.

  • #4
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,642
    Thanks
    6
    Thanked 1,005 Times in 978 Posts
    I'm sorry for pushing but this is bothering me like crazy...
    Does anybody have any idea?
    Thanks guys.

  • #5
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    Sorry I couldn't be more constructive, but that page is just what I don't like.
    Instead of being able to quickly scroll up and down the pictures with my mouse button, I have to hover over some arrow and watch as they slowly slide by.
    I am impatient that way. Drives me up the wall.

    I know, nitpicky. Sorry.

    Maybe someone else can give better advice.

    FWIW, with my Firefox, I didn't see a scroll bar by the pictures.

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #6
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,642
    Thanks
    6
    Thanked 1,005 Times in 978 Posts
    Quote Originally Posted by nikkiH
    Instead of being able to quickly scroll up and down the pictures with my mouse button, I have to hover over some arrow and watch as they slowly slide by.
    Ah that's what you mean. Yeah, well... if you click on the buttons you can accelerate the scrolling - extra for impatient people. I don't wanna have a scrollbar there because... well, I just don't think it would look good in this case.

    Quote Originally Posted by nikkiH
    FWIW, with my Firefox, I didn't see a scroll bar by the pictures.
    Yeah, because it's working as it should in Firefox and even in IE! But I want it to work in Opera and Netscape too.

  • #7
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    Since no one else has posted anything ...

    Did you check the scrolling scripts at DD?
    http://dynamicdrive.com/dynamicindex2/index.html
    Maybe there's a better one there?

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #8
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,634
    Thanks
    0
    Thanked 649 Times in 639 Posts
    Not everyone has a scroll mouse and not all operating systems support a scroll mouse so unless you are developing for an intranet where you can dictate the operating system and type of mouse you shouldn't make any assumptions.

    Also there are some web browsers where if you turn off the scrollbars you also turn off the ability to scroll the page via any means whatsoever (eg. Netscape 6).
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #9
    New Coder
    Join Date
    Apr 2005
    Posts
    84
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If the scroll bar is supposed to be hidden, it is not in Safari for OS 10.4 (a Mac). While I doubt there is a way to hide a scroll bar, you probably can cover it. I haven't done any testing, but why not place an absolutely positioned div over the scroll bar. Using z-index, you can place the div over the scrolling div's scrollbars.

    Code:
    <style type="text/css">
        #scroll {
            position: absolute;
            top: 10px;
            left: 10px;
            width: 200px;
            height: 300px;
            padding: 0 15px 0 0; /* extra space for different scrollbar sizes */
            overflow: auto;
            z-index: 1;
        }
        #cover {
            position: absolute;
            top: 10px;
            left: 175px;
            width: 25px;
            height: 300px;
            background: #fff;
            z-index: 2;
        }
    </style>
    Code:
    <div id="scroll">
        <p>Your Content</p>
    </div>
    <div id="cover"></div>


  •  

    Posting Permissions

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