Show only vertical scroll bar for Html DIV using CSS

Last Reply 8 months ago By pandeyism

Posted 8 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 8 months ago Modified on 8 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