Show only vertical scroll bar for Html DIV using CSS

Last Reply 10 months ago By pandeyism

Posted 10 months ago

Hi ,

I want only vertical scroll for div don't want horizontal scroll..I have tried many css stop horizontal scroll but it showing.

Posted 10 months ago Modified on 10 months ago

 Hi amar,

Please refer below sample.

HTML

<div style="width: 100px; max-height: 100px; overflow-x: hidden; overflow-y: hidden;
    overflow-y: scroll;">
    I want only vertical scroll for div don't want horizontal scroll..I have tried many
    css stop horizontal scroll but it showing.
</div>

Demo