Ying Style
Ying Style

Reputation: 750

How can I get a Vertical Scroll in my web-page?

I did a web-page: my-web-page But there is no Vertical Scroll bar when reducing browser window. How can I get the Vertical Scroll?

My style.css File as follow:

a busy cat http://www.cde-express.com/wangying/css.jpg

Thanks a lot!

Upvotes: 1

Views: 13165

Answers (3)

Priya Ranjan Singh
Priya Ranjan Singh

Reputation: 1567

The scrollbar is hidden because you're explicitly hiding it.

If you get rid of the part overflow: hidden on line 24, you should see your scrollbar back. Your line 24 should look like:

body{ margin: 0;padding: 25px 0px 0px 30px; }

Upvotes: 2

Vish
Vish

Reputation: 169

For having only vertical scroll we can use overflow-y property in css.. It restricts it to vertical scroll alone.

Upvotes: 1

Dynamic Remo
Dynamic Remo

Reputation: 531

Hope this may help you !! Simply add this line to your DIV with css of "main class"

overflow-y: scroll;

Thats it :) your left pan will be scrollable. If want some stylish Scroll Bar, then add these lines in the start of your CSS File.

/* Let's get this party started */
::-webkit-scrollbar {
    width: 12px;
}

/* Track */
::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px greenyellow; 
    -webkit-border-radius: 10px;
    border-radius: 10px;
}

/* Handle */
::-webkit-scrollbar-thumb {
    -webkit-border-radius: 10px;
    border-radius: 10px;
    background: orange; 
    -webkit-box-shadow: inset 0 0 6px blueviolet; 
}
::-webkit-scrollbar-thumb:window-inactive {
        background: yellow; 
}

Upvotes: 2

Related Questions