HTML - HTML Codigo imagenes lado a lado
Necesito ayuda para colocar 2 imagenes lado a lado en una tabla, el problema es que siempre quedan lado a lado pero una debajo de la otra. nose que hacer a continuacion el codigo y la imagen de la tabla. desde ya muchas gracias <?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="/">
<html>
<body>
<table border="1" width="300" cellpadding="5" cellspacing="0">
<tr bgcolor="#9cbce2">
<th width="50%" align="center">CODEL</th>
<th width="50%" align="center">MAPA RECURSOS</th>
</tr>
<xsl:variable name="nameCol" select="FieldsDoc/Fields/Field/FieldName"/>
<xsl:if test="string-length($nameCol) != 0">
</xsl:if>
<xsl:variable name="index" select="1"/>
<xsl:for-each select="FieldsDoc/Fields/Field">
<tr>
<td>
<xsl:choose>
<xsl:when test="FieldName[starts-with(., 'Imagen1')]">
<xsl:variable name="imageURL" select="FieldValue"/>
<p><img border="0" src="{$imageURL}" width="210" height="147"></img></p>
</xsl:when>
</xsl:choose>
</td>
<td>
<xsl:choose>
<xsl:when test="FieldName[starts-with(., 'Imagen2')]">
<xsl:variable name="imageURL" select="FieldValue"/>
<p><img border="0" src="{$imageURL}" width="210" height="147"></img></p>
</xsl:when>
</xsl:choose>
</td>
</tr>
</xsl:for-each>
</table>
<table border="1" width="450" cellpadding="5" cellspacing="0">
<tr bgcolor="#69A654">
<th width="50%" align="center">Field Name</th>
<th width="50%" align="center">Field Value</th>
</tr>
<xsl:for-each select="FieldsDoc/Fields/Field">
<tr>
<xsl:if test="(position() +1) mod 2">
<xsl:attribute name="bgcolor">#D4e4f3</xsl:attribute>
</xsl:if>
<xsl:if test="string-length($nameCol) != 0">
<td>
<xsl:value-of select="FieldName"/>
</td>
</xsl:if>
<td>
<xsl:choose>
<xsl:when test="FieldName[starts-with(., 'Imagen')]">
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="FieldValue"/>
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>También te puede interesar...
Aqui el link del resultado indeseado del codigo de arriba https://docs.google.com/open?id=0B_uc1xIwodMSYlpXdm5neWZaNGc
Hola Eduardo, creo que si quitas la <p> que hay delante de las imagenes <img... seria suficiente, no? Coméntanos, ok?
Mucha gracias por turespuesta xve, ya lo probe y no funciona. alguna otra idea? Fondo aleatorio + alineación bloque Ayuda con redireccion |