0
我有两个表。如何在页面上指定表的位置
我希望他们彼此靠近,而不是像现在一个一个列。
我该怎么做?
如何在一般情况下,我可以指定页面上的位置。
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<h2>My CD Collection</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th>Title</th>
<th>Artist</th>
</tr>
<xsl:for-each select="catalog/cd">
<tr>
<td><xsl:value-of select="title"/></td>
<td><xsl:value-of select="artist"/></td>
</tr>
</xsl:for-each>
</table>
<table border="1">
<tr bgcolor="#9acd32">
<th>Title</th>
<th>Artist</th>
</tr>
<xsl:for-each select="catalog/cd">
<tr>
<td><xsl:value-of select="title"/></td>
<td><xsl:value-of select="artist"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
这不是一个XSLT问题 - 你只需要知道HTML。 – 2011-12-30 13:08:57
这是很不清楚你想要什么。你是什么意思,'彼此靠近'? – ptriek 2011-12-30 13:44:42
@ptriek正确 – 2011-12-30 13:49:16