PDA

View Full Version : CSS - Displaying an item horizontally (rss)



Jakobi
Apr 27th, 2007, 02:13 PM
Hello,

I am looking to begin a rss stylesheet but need help with one item. Most RSS feeds display vertically, from up to down.

However I would like to display it horizontally, from left to right. What css element or elements would control that or does someone have an example?

Basically instead of:
:)
:)
:)
:)
:)

I would like this:
:) :) :) :) :)

I have been looking around but havent found too much information. Does anyone have any insight on this?


Thanks.

Arbitrator
Apr 27th, 2007, 04:43 PM
CSS does not use "elements"; it uses "properties". p is an HTML/XHTML element whereas text-align is a CSS property.

You can can get elements to display on the same line by either (A) displaying them as text using declarations such as display: inline or by (B) floating them onto the same line by using either of the float: left or float: right declarations.

Example A:

<h1>Header</h1>
<p>This is a paragraph</p>


h1, p { display: inline; }

Example B:

<p>This is a paragraph.</p>
<p>This is another paragraph.</p>


p { float: left; width: 50%; }I don't know RSS, so I can't offer examples specific to that language.

Jakobi
Apr 29th, 2007, 12:46 AM
Thanks for the reply. I have tried several different things, but no success. I need the items to be displayed horizontally instead of vertically.

Am i missing something or should i add something:


/*RSS FEED*/
.rss_box {
margin: 0;
width: 187px;
display: inline;
}
.rss_items {
margin-top:0px;
padding:0.5em 0.5em;
margin-left:0px;
color:#031a6a;
}
.rss_item {
font-family: small Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
font-weight : bold;
list-style:none;
color: #fff;
}

.rss_item a {
text-decoration : none;
color: #031a6a;
font-size: 12px;
font-weight:bold;
font-family:small Verdana, Arial, Helvetica, sans-serif;
}

.rss_item a:visited {
color:#000;

}

Thanks.