Displaying XSLT using external CSS



I have an XSL file and a CSS file, to display my XML, but I can't seem to get the CSS to take effect and not sure why it won't display with the CSS, is just showing all text normally.



h1
{
background-color:black;
color:#A901DB;
text-align:center;
padding:20px;
float:center;
width:1000px;
font-family:"Lucida Sans Unicode";
}


XSL



<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://ift.tt/tCZ8VR" version="1.0">
<xsl:template match="/">
<html>
<head>
<link rel="stylesheet" type="text/css" href="BlogCSS.css"/>
</head>

<body>

<xsl:apply-templates />

</body>
</html>
</xsl:template>

<xsl:template match="blogPost">
<p>
<xsl:apply-templates select="blogTitle"/>
</p>
</xsl:template>

<xsl:template match="blogTitle">
<h1>
<xsl:value-of select="."/>
</h1>
<br/>
</xsl:template>
</xsl:stylesheet>


XML file has the line and it's displaying all the information in the XML file it's just not applying the CSS too it.


Thanks.


No comments:

Post a Comment