Styling an imported RSS feed

Posted on 2008-10-13
Last Modified: 2012-05-05
So, someone has asked me to add RSS feeds to their site. Using

Once I have the feed generated (code below) I need to stylize to make it look like the other headlines that are already on the site.

I get it close but can never make the headline and the one line of article text look different.

The site is I have commented out the RSS code for right now.

CSS code is below the RSS feed code below.

<span class="rss">
<ul><li><script language="JavaScript" src="" type="text/javascript"></script>
<a href="">View RSS feed</a>
    .rss {
	list-style-type: none;
    .rss ul {
	list-style-type: none;
	padding-left: 5px;
    .rssitem {	font-family: Georgia, serif;
	font-size: 16px;
	color: #0c5791;
	padding-left: 10px;

Open in new window

1 Comment

Accepted Solution

absx earned 500 total points
ID: 22709590
When you look at the contents of the feed at, you'll see that the feed is formatted in a fashion that already provides structure and class names:

<div class='rss_box'>
  <ul class='rss_items'>
    <li class='rss_item'>
      <a class='rss_item'>headline/link</a>
      <br />Story start

Therefore you can just override styles for these classes and objects and leave out the <span> and <ul> from your own page (see example).
    .rss_box {
        list-style-type: none;
	.rss_box ul {
		list-style-type: none;
	.rss_box li {
		margin-bottom: 10px;
		font-size: 14px;
		font-family: helvetica;
		color: #000;
    .rss_box a {
    	text-decoration: none;
        list-style-type: none;
    .rss_item {  font-family: Georgia, serif;
        font-size: 16px;
        color: #0c5791;
<script language="JavaScript" src="" type="text/javascript"></script>
<a href="">View RSS feed</a>

Open in new window


Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Cannot call a static method on an Eloquent object 6 33
Changing alignment and creating border 6 29
Why a span is lower 2 20
PHP Syntax Error 4 27
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at Browse or search based on font properties or name to find a suitable font for…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question