only Verticle scrollbar to div is appearing [Resolved]

Posted by Pallubhosale under ASP.NET on 3/19/2014 | Points: 10 | Views : 1817 | Status : [Member] | Replies : 8
Hi,
I am using below div to make grid view vertical and horizontal scrollable .
But only verical scrollbar is appearing. Horizontal scrollbar not showing

<div style="overflow-x:auto; overflow-y:auto; width:1000px">

Pallavi


Responses

Posted by: Mamireddy on: 3/20/2014 [Member] Starter | Points: 50

Up
0
Down

Resolved
it is possible depend on gridview height. if gridview height increased then div height possible increased.
its not possible gridview height over div height.


<div style="overflow-x:scroll; overflow-y:scroll; width:250px;height:250px;">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false"
Height="250px" Width="250px" >




MallaReddy

Pallubhosale, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Allemahesh on: 3/19/2014 [Member] [MVP] Silver | Points: 25

Up
0
Down
Dear Pallavi,

Please mentioned height in the div.

See the below one:-

<div style="overflow-x:auto; overflow-y:auto; width:1000px; heigh:100px;"> 


Happy coding.

Pallubhosale, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Pallubhosale on: 3/19/2014 [Member] Starter | Points: 25

Up
0
Down
Hi Allemahesh,
I tried in that way also.
But Somtime it shows the both vertical and horizontal scrollbar sometime not.. Is it because of browser problem???
& I am also getting warning like overflow-x is not valid css property name

Pallavi

Pallubhosale, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Allemahesh on: 3/19/2014 [Member] [MVP] Silver | Points: 25

Up
0
Down
Yes, It is browser problem.
So, you can google for differrent css for different browser.
If some cases, you need to add multiple css properties for different browser.

Happy coding.

Pallubhosale, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: A2H on: 3/19/2014 [Member] [MVP] Silver | Points: 25

Up
0
Down
Hi,
Have you tried setting the overflow property to scroll rather than auto like given below
<div style="overflow-x:scroll; overflow-y:scroll; width:150px;height:100px"> 
<input type="text"/><br/>
<input type="text"/><br/>
<input type="text"/><br/>
<input type="text"/><br/>

</div>

This will ensure the scroll bar is shown always.
You can find a working sample in below link
http://jsbin.com/zikuxozi/1/edit?html,output

Thanks,
A2H
My Blog

Pallubhosale, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Pallubhosale on: 3/19/2014 [Member] Starter | Points: 25

Up
0
Down
Hi A2H,
<div style="overflow-x:scroll; overflow-y:scroll; width:150px;height:100px">

I tried Scroll property Also


Pallavi

Pallubhosale, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Mamireddy on: 3/19/2014 [Member] Starter | Points: 25

Up
0
Down
Hello Pallavi,

you observed near Width:100px, you put a semicolon end of width like

<div style="overflow-x:auto; overflow-y:auto; width:1000px;">

Thanks,
MallaReddy

MallaReddy

Pallubhosale, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: A2H on: 3/19/2014 [Member] [MVP] Silver | Points: 25

Up
0
Down
Hi,
Could you please provide some additional details.
Does your grid view height grow over the div height?
Could you please post your Gridview mark up if possible.

Thanks,
A2H
My Blog

Pallubhosale, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response