c# - How to add separator between rows in asp.net -
here code, in i'm seeing table filled data no separators visible want separator b/w rows , columns. how add separator in asp.net html table. how update in css file separator look
<table class="tablestyle" id="table1"> <thead><tr><th id="th1" style="background-color:#507cd1;width:150px;font-weight:bold;color:white"><div>number</div></th> <th id="th2" style="background-color:#507cd1;width:150px;font-weight:bold;color:white">type</th><th id="th3" style="background-color:#507cd1;width:150px;font-weight:bold;color:white">name</th> </tr></thead> <% for(int i=0 ;i<10;i++) { string id = i.tostring(); %> <tr><td headers="th1" style="background-color:#eff3fb;">hello world </td><td headers="th2" style="background-color:#eff3fb;">hello world</td> <td headers="th3" style="background-color:#eff3fb;"></td></tr> <%} %> </table>
here css example. see demo
if redered html following.
<table> <thead> <tr> <th>number</th> <th>type</th> <th>name</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>2</td> <td>3</td> </tr> <tr> <td>1</td> <td>2</td> <td>3</td> </tr> </tbody> </table>
css
table { border-collapse:collapse; } table, th, td { border: 1px solid black; background-color:#eff3fb; } table thead th { background-color:#507cd1;width:150px;font-weight:bold;color:white }
Comments
Post a Comment