943,542 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Marked Solved
  • Views: 672
  • ASP.NET RSS
Mar 15th, 2009
0

table problem

Expand Post »
I have an .aspx file and i try to align the table to the center. But when i do this

ASP.NET Syntax (Toggle Plain Text)
  1. <table style="text-align:center">

it does not work.

It shows the table always at the left side of the page.
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
Xessa is offline Offline
58 posts
since Jan 2008
Mar 16th, 2009
0

Re: table problem

<table style="text-align:center">
This is to align the content/data inside the table
One way to achieve your requirement is to put your table inside a div and align the div to center. Here is a sample

<div style ="width:100%; height: 100%; text-align: center">
<table >
<thead>
<tr>
<td>Name</td>
<td>Roll NO</td>
<td>Class</td>
</tr>
</thead>


<tr>
<td>Alex</td>
<td>20901</td>
<td>10</td>
</tr>


<tr>
<td>Betty</td>
<td>20902</td>
<td>11</td>
</tr>

</table>
</div>
Reputation Points: 16
Solved Threads: 18
Junior Poster
Aneesh_Argent is offline Offline
104 posts
since Dec 2008
Mar 16th, 2009
0

Re: table problem

hi,

you can try like this

ASP.NET Syntax (Toggle Plain Text)
  1. <center>
  2. <table >
  3. </table>
  4. </center>
Reputation Points: 25
Solved Threads: 29
Posting Whiz
greeny_1984 is offline Offline
372 posts
since Apr 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC