Solved

Display only vertical scroll bar for a div

Posted on 2008-10-01
3
4,120 Views
Last Modified: 2013-11-19
Hi There

I have a div and I would like only the vertical scroll bar to be visible.
The div would never scroll horizontally.
If their is no overflow horizontally i would like the scroll bar to still be there.
Thanks
Stanton
0
Comment
Question by:Stanton_Roux
3 Comments
 
LVL 39

Accepted Solution

by:
Pratima Pharande earned 200 total points
ID: 22612247
0
 
LVL 3

Assisted Solution

by:cameroncooke
cameroncooke earned 200 total points
ID: 22612251
Use the following stylesheet rule on the DIV element.
overflow-x: none;

Open in new window

0
 
LVL 4

Assisted Solution

by:sijishJohn
sijishJohn earned 100 total points
ID: 22612412
try this..
<div style="overflow-x:hidden;overflow-y:scroll;"></div>
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Html fieldset fix its height and width 4 44
Non-Resizable Pharagraph 2 18
Triple line in an alert message 4 21
Increase image taller on inner pages 2 13
This article discusses four methods for overlaying images in a container on a web page
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question