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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTML Table Cells Not Aligned on Right Side

Status
Not open for further replies.

bsquared18

Technical User
Jun 10, 2001
329
US
I created a long table, code for a shortened version of which is given below with some text "greeked."

At first, I had just two rows: the subheads in the first row, and everything else in the one below it. But when I previewed the file, the first row, although perfectly aligned on the left edge, was indented slightly on the right edge in relation to the second row. (The problem doesn't show up on the shortened version whose code I've included below.)

So, I tried putting each testimonial in its own row to see if that would solve the problem. The result was that some rows bulged out a bit on the right in relation to the rows above and below them.

When I dragged the right-hand edge of the browser in to simulate a smaller screen, there was a change in which rows bulged and which didn't.

Any thoughts on what I'm doing wrong and suggestions on how to keep the right-hand edge of my long HTML table in a straight line?

Thanks!

Bill (Code Given Below)

_______________________________________________

<body bgcolor="D8C9B2" LINK="#CC6600"
VLINK="#CC6600"
ALINK="#CC6600">


<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=10 WIDTH=100%>
<TR>
<TD WIDTH=15% >
</TD>
<TD WIDTH=35% VALIGN="TOP" BGCOLOR="FFF9F9">
<i><font face="garamond" size="4"><strong><font color="#CC6600">Wedding Feedback</strong></font>
</TD>
<TD WIDTH=35% VALIGN="TOP" BGCOLOR="FFF9F9">
<P align="right"><A HREF="#portrait">(click for portrait feedback)</A></font></i>
</TD>
<TD WIDTH=15% >
</TD>
</TR>

<TR>
<TD WIDTH=15% >
</TD>
<TD WIDTH=70% COLSPAN=2 VALIGN="TOP" BGCOLOR="FFF9F9">
<font face="garamond" size="3">

<i>We just wanted...</i>
<P align="right">
—Ellie and Frank
<br>
<br>
<TR>
<TD WIDTH=15% >
</TD>
<TD WIDTH=70% COLSPAN=2 VALIGN="TOP" BGCOLOR="FFF9F9">
<P align="left"><i>I just xcos sofw apfo sope zpow dwled aofe slad wpda paqw dapd goem apso spdd
posa osis psss qprs opwe opwr bieg apgl mbeo pdk ppppe spfs psff qpe sthe wpss dssf mwpt sper</i><p>
<br>
<br>
<TR>
<TD WIDTH=15% >
</TD>
<TD WIDTH=70% COLSPAN=2 VALIGN="TOP" BGCOLOR="FFF9F9">
<P align="left"><i> I just xcos sofw apfo sope zpow dwled aofe slad wpda paqw dapd goem apso spdd
posa osis psss qprs opwe opwr bieg apgl mbeo pdk ppppe spfs psff qpe sthe wpss dssf mwpt sper </i><p>
<P align="right">
—Julie
<br>
<br>
<TR>
<TD WIDTH=15% >
</TD>
<TD WIDTH=70% COLSPAN=2 VALIGN="TOP" BGCOLOR="FFF9F9">
<P align="left"><i>I just xcos sofw apfo sope zpow dwled aofe slad wpda paqw dapd goem apso spdd
posa osis psss qprs opwe opwr bieg apgl mbeo pdk ppppe spfs psff qpe sthe wpss dssf mwpt sper</i><p>
<P align="right">
—Robin and Pamela [parents of bride]
<br>
<br>
<TR>
<TD WIDTH=15% >
</TD>
<TD WIDTH=70% COLSPAN=2 VALIGN="TOP" BGCOLOR="FFF9F9">
<!-- Portraits Start Here -->

<P align="left"><A NAME="portrait"><i><font face="garamond" size="4"><strong><font color="#CC6600">
Portrait Feedback</font></strong></i>
<font face="garamond" size="3">
<TR>
<TD WIDTH=15% >
</TD>
<TD WIDTH=70% COLSPAN=2 VALIGN="TOP" BGCOLOR="FFF9F9">
<P align="left"><i>Thank you...</i><p>
<P align="right">
—Nicole and Mark
</TD>
<TD WIDTH=15% >
</TD>
</TR>
</TABLE>
</body>
</html>
 
Figured it out myself. Just needed to set the cellpadding to 0 and add an extra, narrow white column spanning the rows on each side of the table. Was able to revert to the version that has only two rows.

Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top