table problem

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Jan 2008
Posts: 54
Reputation: Xessa is an unknown quantity at this point 
Solved Threads: 0
Xessa Xessa is offline Offline
Junior Poster in Training

table problem

 
0
  #1
Mar 15th, 2009
I have an .aspx file and i try to align the table to the center. But when i do this

  1. <table style="text-align:center">

it does not work.

It shows the table always at the left side of the page.
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 104
Reputation: Aneesh_Argent is an unknown quantity at this point 
Solved Threads: 18
Aneesh_Argent Aneesh_Argent is offline Offline
Junior Poster

Re: table problem

 
0
  #2
Mar 16th, 2009
<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>
Falling down is not defeat...
Defeat is when you refuse to getup...
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 370
Reputation: greeny_1984 is an unknown quantity at this point 
Solved Threads: 29
greeny_1984's Avatar
greeny_1984 greeny_1984 is offline Offline
Posting Whiz

Re: table problem

 
0
  #3
Mar 16th, 2009
hi,

you can try like this

  1. <center>
  2. <table >
  3. </table>
  4. </center>
If u r query is achieved,mark the thread as solved

Live and Let Live
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for ASP.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC