Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I have div in that i have table, and I am adding table row using loop.
my div size is fixed, when in table more row added then scrollbar should be visible.


how to do this?
thanks

What I have tried:

HTML
<div style="overflow-x:auto!important;">
<table style="width:90%;" >
   <tr style="font-size:1.5em;"><td>Value</td><td>Time</td></tr>
      @foreach (var itemModel in item)
      {
         <tr style="font-size:1em;">
         <td>@itemModel.Value</td>
         <td>@itemModel.Timestamp</td>
         </tr>
                                            }
</table>
</div>
Posted
Updated 7-Apr-20 21:12pm
Comments
ZurdoDev 14-Jun-17 7:39am    
overflow-y: auto
Member 11859517 14-Jun-17 8:14am    
hey RyanDev,

still it visible, with style="overflow-y:auto!important;"

Refer this link it should help

Table scroll with HTML and CSS - Stack Overflow[^]
 
Share this answer
 


...

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900