Jump to content

Table Alignment


Recommended Posts

I have been having some trouble getting the following table to render correctly. The problem is when I use colspan="2" the <td> with the image above it expands to two columbs below it for no appant reason. The image is only 110px wide. I have tried defining the image width and height. Also have tried setting the tables below it <td> to a static size that does not total over 110px. What am I missing here? Yes, this is a combination of xml, xslt, css and html/xhtml but there should not be a difference.

<table id="table">	<th id="tableheader" colspan="6"><xsl:for-each select="$XML">					<ul>						<xsl:for-each select="AffiliateAccountOffers">							<xsl:for-each select="OfferDetails">								<xsl:for-each select="Offername[../OfferId='56']">								<xsl:apply-templates/>								</xsl:for-each>							</xsl:for-each>						</xsl:for-each>					</ul>				</xsl:for-each></th>  <tr>	<td id="tdimage" colspan="2"><xsl:for-each select="$XML">						<xsl:for-each select="AffiliateAccountOffers">							<xsl:for-each select="OfferDetails">								<xsl:for-each select="SmallCreative[../OfferId='56']">								  <img src="{.}"/>								  <xsl:apply-templates/>								</xsl:for-each>							</xsl:for-each>						</xsl:for-each>				   </xsl:for-each>				</td>	<td id="tdcontent" colspan="4"><xsl:for-each select="$XML">						<xsl:for-each select="AffiliateAccountOffers">							<xsl:for-each select="OfferDetails">								<xsl:for-each select="OfferTextdetails[../OfferId='56']">								<xsl:apply-templates/>								</xsl:for-each>							</xsl:for-each>						</xsl:for-each>					</xsl:for-each></td>	</tr>  <tr>	<td id="tdtitle">Intro APR</td>	<td id="tdtitle">Intro Period</td>	<td id="tdtitle">Regular APR</td>	<td id="tdtitle">Annual fee</td>	<td id="tdtitle">Balance Transfer</td>	<td id="tdtitle">Credit Needed</td>  </tr>  </table>

Here is an image of the result..table.gifI simply would like to discover why the image area is so large and why I cannot control the size of the <td> elements below it.Thanks everyone, I'm sure this is simple as most things. ;-)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...