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 8 of 8
  1. #1
    New Coder
    Join Date
    Jun 2002
    Location
    Spain
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    insert an scrollbar on a div

    Hello!, here's a question, Can I insert a scroll bar on a div? I need to visualize a huge HTML code on a limited space without using frames, so I need the scroll bar, How can I do it?

  • #2
    Regular Coder
    Join Date
    Jul 2002
    Location
    U.S. (Wish Japan though)
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Why can't you use frames? iframes would be simple....

  • #3
    New Coder
    Join Date
    Jun 2002
    Location
    Spain
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Yes, it would be easy

    Yes it would be easy, but it slows my application (and it is so slow now), and speed is critical to my client. (javascript is so fast :-) )

  • #4
    Regular Coder
    Join Date
    Jul 2002
    Location
    U.S. (Wish Japan though)
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ah, well sorry, I can't really help you on this one... DIVs are not my specialty..

  • #5
    Regular Coder
    Join Date
    Jul 2002
    Location
    USA
    Posts
    151
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    <div style="overflow:scroll"> Scrollable content goes here </div>
    This should work in all CSS2-compatible browsers.

  • #6
    New to the CF scene
    Join Date
    Jun 2002
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile addition to previous poster's answer

    You can set both the x and y axis overflow to 'auto', 'no', and 'yes':

    For example:
    style='overflow-y: auto; overflow-x: no;'

  • #7
    Regular Coder
    Join Date
    Jun 2002
    Posts
    185
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If you use overflow: scroll; or overflow:auto; you may also need to set the height style for the DIV.

  • #8
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts

    Re: addition to previous poster's answer

    Originally posted by WAlurker
    You can set both the x and y axis overflow to 'auto', 'no', and 'yes':

    For example:
    style='overflow-y: auto; overflow-x: no;'
    Not if you care about W3C standards, and support for non-IE browsers.


  •  

    Posting Permissions

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