www.webdeveloper.com
Results 1 to 4 of 4

Thread: Custom DIV Overflow

  1. #1
    Join Date
    Jul 2006
    Posts
    25

    Custom DIV Overflow

    Hey there everybody. I'm redesigning the website for the bar that I work at. I am by all means a rookie at this, and my question was how do I create an overflow div that doesn't have the bottom scrollbar? Basically I want it to only scroll up and down. You can see what I'm stuck on by going to www.myspace.com/skyebar and looking at the scrollbar around their friends list. I won't be using it for the same thing, as I'm redesigning the Myspace, I would just like to know how to do it for something else.

  2. #2
    Join Date
    Apr 2006
    Posts
    225
    Try this
    <div style="border:1px blue solid; width:300px; height:300px; overflow:auto;">

    <p>ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text ok then here is a bunch of text </p>


    </div>

  3. #3
    Join Date
    Jul 2006
    Posts
    25
    I guess I should have rephrased that. I know how to do a div overflow, what I don't get is how to hide the horizontal scrollbar that shows up at the bottom of the div.

    Edit: Check out what I'm working on at http://www.skyebar.com/temp/home.html
    Last edited by grut; 01-25-2007 at 06:36 AM.

  4. #4
    Join Date
    Apr 2006
    Posts
    225
    I looked at this in FF and IE and I don't see a scrollbar.
    <div style="border:1px blue solid; width:300px; height:300px; overflow:auto;">
    This will eliminate the bottom scrollbar but not the side scrollbar. You can change the width and height for your needs and eliminate the border. As long as the content will wrap this will work.
    The reason there is a bottom scrollbar here http://www.myspace.com/skyebar is the content (a 640px wide graphic) is wider than the window displaying it. If you insert a 640px graphic inside a container that is only 600px wide the you will get the scrollbar if the overflow is set to auto. So make your content to fit the size of the container (div).

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