0 Replies - 1070 Views - Last Post: 27 November 2005 - 04:21 AM

#1 lattyware  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 56
  • Joined: 08-August 05

Using CSS to syle a RSS feed.

Posted 27 November 2005 - 04:21 AM

Description: Save the code as a CSS file, then add the line below to your feed, replacing 'styles.css' with the relevent name, right under the first line.When you create an RSS feed and it get's clicked on, you just get a basic XML readout, OK, but not very pretty, and will put off a user. This
LINE FOR FEED:
<?xml-stylesheet type="text/xsl" href="styles.xsl" ?>

CSS:
@charset "iso-8859-1";

channel link, channel language, channel copyright, channel managingEditor, channel webMaster, channel docs, channel lastBuildDate {
     display:none;
}
rss {
     font-family:Verdana, Arial, Helvetica, sans-serif;
     font-size:0.7em;
     line-height:130%;
     margin:1em;
}

channel title {
     display:block;
     padding:0.4em 0.2em;
     color:#FFF;
     border-bottom:1px solid black;
     font-weight:bold;
     font-size:140%;
     background-color:#FF9600;
}
channel description {
     display:block;
     float:left;
     font-size:130%;
     font-weight:bold;
     margin:0.5em;
}

channel item {
     background-color:#eee;
     border:1px solid #FF9600;
     clear:both;
     display:block;
     padding:0 0 0.5em;
     margin:1em;
}
channel item title {
     background-color:#FF9600;
     border-bottom-width:0;
     color:#FFF;
     display:block;
     font-size:110%;
     font-weight:bold;
     margin:0;
     padding:0.3em 0.5em;
}
channel item description {
     display: block;
     float:none;
     margin:0;
     text-align: left;
     padding:0.2em 0.5em 0.4em;
     color: black;
     font-size:100%;
     font-weight:normal;
}
channel item link {
     color:#666;
     display:block;
     font-size:86%;
     padding:0 0.5em;
}
channel item pubDate {
     color:#666;
     display:block;
     font-size:86%;
     padding:0 0.5em;
}



Is This A Good Question/Topic? 0
  • +

Page 1 of 1