Display only vertical scroll bar for a div

Posted on 2008-10-01
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.
Question by:Stanton_Roux
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 39

Accepted Solution

Pratima Pharande earned 200 total points
ID: 22612247

Assisted Solution

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

Open in new window


Assisted Solution

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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Debugging Html 8 41
BG appearing and then disappaear after a second 8 61
Increase image taller on inner pages 2 50
isNaN issue on the Table input text 2 41
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

732 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