Klevi
Klevi

Reputation: 45

how to add scrollbar in div

I want to add a scrollbar to div id="kryesore" in mainpage,when i try it doesn't work.Can you tell me what can i do and how can i fix it?

below 2 screenshot how it look like : l

Upvotes: 2

Views: 41936

Answers (3)

Prashant Bhujbal
Prashant Bhujbal

Reputation: 427

change the line

<div id="kryesore">

to

<div id="kryesore" style="overflow-y: scroll;">

or you can write in your css or style tag in head as

#kryesore
{
   overflow-y:scroll;
}

working for me.

Upvotes: 6

Pattle
Pattle

Reputation: 6014

You can use the overflow-y property by doing

#kryesore
{
   overflow-y:scroll;
}

overflow-y was only support from IE9 onward so if you are using an older version of IE you could just use overflow

#kryesore
{
   overflow:scroll;
}

Upvotes: 1

Luca Detomi
Luca Detomi

Reputation: 5716

Use overflow property to add scrollbar only when necessary:

#kryesore
{
   overflow-y:auto;
}

Upvotes: 2

Related Questions