adv banner
HTML and CSS  Home HTML and CSS Tutorials How to I get things to align properly within my tables?
rss

How to I get things to align properly within my tables?

Author: Jeff Singer More by this author
Browse Pages: << <  6  7  8  9  10


Example

To place text or graphics where you want in a TABLE Cell (TD) Just find the look you like, and find the ALIGN and VALIGN values. ALIGN is for horizontal placement and VALIGN is for the vertical. In otherwords, put your finger on the button you like, and read up and across for your tags! ;-)

To do a Bullseye

<TD VALIGN=CENTER ALIGN=CENTER>

ALIGN ALIGN=LEFT ALIGN=CENTER ALIGN=RIGHT
VALIGN=TOP
VALIGN=MIDDLE
VALIGN=BOTTOM

Source code

<TABLE BORDER="1" WIDTH="550">
<TR>
<TD>ALIGN</TD>

<TD>ALIGN=LEFT</TD>
<TD>ALIGN=CENTER</TD>
<TD>ALIGN=RIGHT</TD>
</TR>

<TR>
<TD>VALIGN=TOP<BR>---<BR>---<BR>---<BR></TD>

<TD ALIGN="LEFT" VALIGN="TOP"><IMG SRC="g40-99-20.gif"></TD>
<TD ALIGN="CENTER" VALIGN="TOP"><IMG SRC="g40-99-20.gif"></TD>
<TD ALIGN="RIGHT" VALIGN="TOP"><IMG SRC="g40-99-20.gif"></TD>

</TD>
</TR>

<TR>
<TD>VALIGN=MIDDLE<BR>---<BR>---<BR>---<BR></TD>
<TD ALIGN="LEFT" VALIGN="MIDDLE"><IMG SRC="g40-99-20.gif"></TD>
<TD ALIGN="CENTER" VALIGN="MIDDLE"><IMG SRC="g40-99-20.gif"></TD>
<TD ALIGN="RIGHT" VALIGN="MIDDLE"><IMG SRC="g40-99-20.gif"></TD>

</TD>
</TR>

<TR>
<TD>VALIGN=BOTTOM<BR>---<BR>---<BR>---<BR></TD>
<TD ALIGN="LEFT" VALIGN="BOTTOM"><IMG SRC="g40-99-20.gif"></TD>
<TD ALIGN="CENTER" VALIGN="BOTTOM"><IMG SRC="g40-99-20.gif"></TD>
<TD ALIGN="RIGHT" VALIGN="BOTTOM"><IMG SRC="g40-99-20.gif"></TD>

</TD>
</TR>

</TABLE>

See Also:


print this page tell a friend subscribe to newsletter subscribe to rss
Rate this Material: Bad 1 2 3 4 5 Excellent
Browse Pages: << <  6  7  8  9  10

Add comments to "How to I get things to align properly within my tables?"