Hi All,
I've been trying to develop a styled XML feed by using XSLT and CSS but have ran into issues trying to debug some display issues. At the moment it displays as it should in Chrome, but in both IE7 and FF3 are using there default Stylesheets despite my best efforts. I've validated my XML and I know it meets the standards, I just can't see where my code is wrong and would appreciate any help.
XML
XSLTCode:<?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="rss.xsl" ?> <rss version="2.0" xmlns:atom="..."> <channel> <item> ..... </item> </channel> </rss>
CSS:Code:<?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="..."> <xsl:template match="/"> <html> <head> <title> <xsl:value-of select="rss/channel/title" /> </title> <style type="text/css">@import url("rss.css");</style> </head> <body> <div class="header"> <img src="..." alt="..." /> </div> <div class="content"> <table> <tbody> <tr valign="top"> <td> <div style="width:600px"> <xsl:for-each select="rss/channel/item"> <p> <a href="{link}" rel="bookmark"> <xsl:value-of select="title" /> </a> Date: <xsl:value-of select="pubDate" /> </p> </xsl:for-each> </div> </td> <td> <div class="right"> <h2> ... </h2> <p> ... </p> <h2>... </p> </div> </td> </tr> </tbody> </table> </div> <div class="footer"> <h4> © ... </h4> </div> </body> </html> </xsl:template> </xsl:stylesheet>
... = links or content I have removed to simplify the code or get round the fact I can't post URL links on this site.Code:<style type ="text/css"> body { margin: 8px; font-family: verdana, arial; } table { width: 100%; vertical-align: top; } div.left { } div.right { width: 250px; position: absolute; right: 10px; } div.header { height: 35px; margin-bottom: 10px; display: block; } div.content { border-top: thin solid #006633; border-bottom: thin solid #006633; display: block; } div.footer { display: block; height: 13px; margin-top: 12px; } </style>
Thanks






Bookmarks