News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Add CSS style to smf SSI

Started by ormuz, November 27, 2007, 01:03:29 PM

Previous topic - Next topic

ormuz

I have this code to display the boardnews SSI on my site!

Is working just fine! Now, how can I add some custom CSS style to it? An exemple would be great!



<?php

/** ensure this file is being included by a parent file */

defined'_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
?>


<?php
$newsItems 
ssi_boardNews(802null100'array');
foreach (
$newsItems as $news)
echo '
<div>
<a href="'
$news['href'], '">'$news['icon'], '</a> <b>'$news['subject'], '</b>
<div class="smaller">'
$news['time'], ' '$txt[525], ' '$news['poster']['link'], '</div>

<div class="post" style="padding: 2ex 0;">'
$news['body'], ' <a href="'$news['href'], '">Ler mais...</a></div>

'
$news['link'], $news['locked'] ? '' ' | ' $news['comment_link'], '
</div>'
;
?>


thanks!

Gary

You can add it to your site's CSS (NOT your theme's) File and call it in the div with

<div class="myclass">
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

ormuz

I make this chage to put the "comment links" align on the right, but isn't working


<div class="x1">', $news['link'], $news['locked'] ? '' : ' | ' . $news['comment_link'], '</div>

And im my css file
x1 {


text-align: right;

}


What's wrong?

Gary

it would be

.x1
{
  text-align: right
}


note the dot. ;)
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

ormuz

lol, thanks! Its always good to have a fresh look on it!

Advertisement: