Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

alternative for align in style sheet for table

Status
Not open for further replies.

nirmalgupta

IS-IT--Management
Sep 12, 2001
35
IN
Hi,
I want to use style sheets to align the table. Consider the code:
<Table align= center >

is it possible to get this functionality through style sheet.
TIA
Nirmal Gupta
 
try
text-align

values:

-left
-right
-center
-justify

(for valign i think it should be vertical-align)

but i could be wrong.. Victor
 
Hi Vituz,
Actually i want the alignment of table not the text inside.
If u use
<table align = center >
<tr>
<td>
try
</td>
</tr>
</table>

you will find that the table is aligned at center.

is there any alternative in style sheet for this align=center.

rgds
Nirmal
 
i just tryed this piece, & if i got it right, it DOES the alignment for table:


<style>
.aa{
text-align:center;
}
</style>

<table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;1&quot; cellpadding=&quot;1&quot; height=&quot;100%&quot; class=&quot;aa&quot;>
<tr>
<td>
<table width=&quot;30%&quot; border=&quot;1&quot; cellspacing=&quot;2&quot; cellpadding=&quot;2&quot; bgcolor=&quot;#0066FF&quot;>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>

is it what you wanted? Victor
 
hi,
This will align the text in the center of table.
I want to align table at the center of page.
rgds
Nirmal
 
wooo.. have you has a look on my piece?

i've maid nested tables, & one is centered in the other, & the other (lets say &quot;top&quot;) table is 100% width & height, so it might be said that the second table is centered on the page..

am i missing something?

sorry if it is not what you was after.. i'm gone Victor
 
thanx yaar,
actually i didnot see it thoroghly. yes ! this is what i wanted.
Nirmal Gupta
 
Try this:
Code:
Put the table inside a div and set the alignment on the div. Tracy Dryden
tracy@bydisn.com
[URL unfurl="true"]www.bydisn.com[/URL]

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top