XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 22nd, 2004, 01:33 PM
DZero DZero is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 7 DZero User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Help with link colors

Hi there, is that possible to change the link colors on this code? it's working, but the link colors are the default ones.

[BEGIN XML FILE "bandnews2004.xml":]

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="bandnews2004.xsl"?>

<BANDNEWS>
<BNEWS>
<DATE>10/07/2004</DATE>
<TEXT>HERE'S A SAMPLE TEXT 01</TEXT>
</BNEWS>

<BNEWS>
<DATE>14/06/2004</DATE>
<TEXT>HERE'S A SAMPLE TEXT 02
<a href="#">HERE'S A SAMPLE LINK</a>
HERE'S A SAMPLE TEXT 02
HERE'S A SAMPLE TEXT 02
</TEXT>
</BNEWS>

</BANDNEWS>

[END XML FILE "bandnews2004.xml"]

[BEGIN XSL FILE "bandnews2004.xsl"]

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:template match="/">
<html>
<head>
<title>Band News 2004</title>
<style>
.date { width: 602px; height: 2em; line-height: 2em; color: white; background: black; border: 1px black solid; }
img { padding: 0 5px 0 5px; }
.text { width: 602px; height: auto; border: 1px black solid; }
</style>
</head>
<body>
<xsl:for-each select="//BNEWS">
<xsl:sort select="DATE" />
<div class="date">
<img src="your_icon.gif" /> <xsl:value-of select="DATE" />
</div>
<div class="text"><xsl:copy-of select="TEXT" /></div>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

[END XSL FILE "bandnews2004.xsl"]

thx a lot!

Reply With Quote
  #2  
Old July 22nd, 2004, 01:51 PM
kid23 kid23 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 62 kid23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
your style must be like this:

.date a:link, .date a:active, .date a:visited
{
color: #FF0000;
text-decoration: none
}

.date a:hover
{
color: #00FF00;
text-decoration: none
}

You can also separate them if you want 4 different colors, but these 4 are the events on which you have control.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > Help with link colors


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT