Click to See Complete Forum and Search --> : align right for a table


Bosun
11-23-2005, 11:20 AM
Hi, I am trying to align a table to the right of the page, but because I cannot use align="right" within the table tag itself (since it is not xhtml compliant), I was wondering if there is a way to do this with styles. Text-align=right is the only option I have come across and this only aligns the text within the table. I have also tried putting another table around this table and within the outer table's td tag, I tried text-align, hoping it would treat the second table in its entirety as text. again this did not work.

basically i want a table aligned to the right, and i want text to wrap around it
any ideas?
thanks a lot for your help!

toicontien
11-23-2005, 02:23 PM
Use:
<table style="float: right;" ... >

Also, if you have a transitional XHTML doctype, you can use presentational attributes.

XHTML 1.0 Transitional = HTML 4.01 Loose (Transitional)

XHTML 1.0 Strict = HTML 4.01 Strict

XHTML 1.0 Frameset = HTML 4.01 Frameset

The only difference between XHTML and HTML is that XHTML conforms to XML syntax.

genomarb
11-25-2005, 11:55 AM
position:absolute; right:0px;


u can only use float if its inside something to float to i.e;

<p style='float:right;'>word<a href='#' style='float:left;'>hello </a></p>