www.webdeveloper.com
Results 1 to 5 of 5

Thread: How do I get scroll bars without using frames?

  1. #1
    Join Date
    Sep 2003
    Posts
    218

    How do I get scroll bars without using frames?

    I am designing a website that has to be of a constant height for all of the pages.

    For one of the pages, the data is too long and makes the page too long.

    Can someone tell me how I can have scroll bars for my data?
    (Without using frames.)
    I've seen it on other websites... but am not sure how its done.

    Thanks.


    Jam

  2. #2
    Join Date
    Jul 2003
    Location
    Los Angeles California
    Posts
    1,045
    PHP Code:
    <style type="text/css">
    .
    wow{
    overflow:auto;
    height:125px;
    width:150px;
    }
    </
    style>

    <
    div class="wow">
    FiEIOGFjioiowjgiowjgijgiojgijwiogjiojg
    gwegiwe
    'gjw'epgjw
    egjwpejgpwejgwejg
    wjg
    wejg
    wepjg
    we
    </div

  3. #3
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,222
    This is the same thing but inline:

    <div style="height:500px; width:500px; overflow:auto;">
    This block will have a scroll bar when the contents are too big
    <div>

    Basically we did the same way but I wanted to clarify how it scrolls.

  4. #4
    Join Date
    Jul 2003
    Location
    New York City
    Posts
    2,771
    You could also set the overflow property to 'scroll' which would cause browsers to pop a scroll bar in there regardless of wether the content overflows.

    http://www.w3.org/TR/CSS21/visufx.html#propdef-overflow

    Code:
    <div style="height:500px; width:500px; overflow:scroll;">
    This block will scroll, regardless of wether the content is too big.
    <div>

  5. #5
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,222
    Originally posted by MstrBob
    You could also set the overflow property to 'scroll' which would cause browsers to pop a scroll bar in there regardless of wether the content overflows.

    http://www.w3.org/TR/CSS21/visufx.html#propdef-overflow

    Code:
    <div style="height:500px; width:500px; overflow:scroll;">
    This block will scroll, regardless of wether the content is too big.
    <div>
    Yeah... but that is kind of annoying when it pops in horizontal ones too.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles