Results 1 to 5 of 5

Thread: scrolling div content?

  1. #1
    Join Date
    Sep 2007
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default scrolling div content?

    Can someone point me to a tutorial (or if it's easy enough, just show me here) where I can learn how to make a scrolling div? Ideally, one that looks like this (this would be on a black-backgrounded page):



    Thanks!...

  2. #2
    Join Date
    Jan 2007
    Posts
    629
    Thanks
    10
    Thanked 28 Times in 28 Posts

    Default

    Do you mean autoscrolling, or scrolling? Scrolling is very easy to do. Set up your div tag's height/width and then add this: overflow="auto". The final product would be something like this:
    Code:
    <div height="100px" width="100px" overflow="auto">YOUR CONTENT HERE</div>
    As far at the look you want, I have no Idea how to get it to look like that. (I don't know much about changing the scrollbar).

    EDIT: This code is from w3c:
    Code:
    <html>
    <head>
    <script type="text/javascript">
    function setScrollbarColor()
    {
    document.body.style.scrollbarBaseColor="green";
    }
    </script>
    </head>  
    <body>
    
    <input type="button" onclick="setScrollbarColor()" value="Set ScrollbarColor" />
    
    <p>An example paragraph</p>
    <p>An example paragraph</p>
    <p>An example paragraph</p>
    <p>An example paragraph</p>
    <p>An example paragraph</p>
    <p>An example paragraph</p>
    <p>An example paragraph</p>
    <p>An example paragraph</p>
    <p>An example paragraph</p>
    <p>An example paragraph</p>
    <p>An example paragraph</p>
    
    </body>
    </html>
    So I guess the style would be something like div{scrollbarBaseColor:#123456;} Then just add a background and border and it should be pretty close.
    Last edited by Jas; 02-01-2008 at 08:21 PM.
    --Jas
    function GreatMinds(){ return "Think Like Jas"; }
    I'm gone for a while, but in the meantime: Try using my FTP script | Fight Bot Form Submissions

  3. #3
    Join Date
    Sep 2007
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Jas View Post
    Do you mean autoscrolling, or scrolling? Scrolling is very easy to do.
    Cool, yeah - I don't need auto-scroll. Just manual. Thanks!!!

    If anyone else can help with the color/scrollbar formatting of the div to look like the pic above, it'd be much appreciated too. Thanks again, Jas!!!

  4. #4
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

  5. #5
    Join Date
    Sep 2007
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks so much! - I'm sure something like this will be suitable. Thanks!

Bookmarks

Posting Permissions

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