Forum Moderators: coopster
Just add a margin to your a class:
.rss {
margin: 0px 10px;
}
Then the new code would be:
echo '<a class="rss" href="'.$url.'">'.$title.'</a></li><br>';
Note the typo in & reformating of that line, class='.rss' should be class='rss' and also, the ' character is not a vaild HTML quote.
If you want to use double quotes for the statement, make sure you use double quotes in the link and escape them, as so:
echo "<a class=\"rss\" href=\"$url\">$title</a></li><br>";
<div id="us" style="white-space:pre;"><h4><font color="white"> All the news that fits, as they say:</font></h4>
<?php
//YAHOO
$url = 'http://rss.news.yahoo.com/rss/us';
if ( $url ) {
$rss = fetch_rss( $url );
$i=1;
foreach ($rss->items as $item) {
$href = $item['link'];
$title = $item['title'];if(strlen($title) > 60)
{
$title = substr($title,0,60)."...";
}
echo "<a href=$href target='_top' class='topicimport'> $title</a><br
/>";
$i++;
if ($i == 11)
{
break;
}
}
}
?>
</div>
The HTML gets spaced via the pre style, but the spacing gets done on the browser side of the php, not the server end. That code that I pasted had to be altered for Safari, which insisted in honoring ALL the white space between the php?> expression end and the <div> front and back tags.
Thanks for your help!