Page 1 of 1

Block with its own CSS?

Posted: 17. July 2009 07:26
by ahmiquilena
Hey guys.

I added a central block to my portal, which includes an RSS feed manager, it displays the RSS from raidplanner (eqdkp+ plugin) into its own box. Problem I'm having is trying to style it.

Everything on the portal uses the same CSS, forums, portal, which comes from their respective templates (DVGFX2)

Is there a way to specify what CSS file a particular block uses? I want that block to have a different CSS file and ignore the "main" one the rest of the site uses.

Is that possible? If so, how would I go about doinng that.

Here's my custom block code:

Code: Select all

{$C_BLOCK_H_L}Proximos Raids{$C_BLOCK_H_R}
<table class="tablebg" cellspacing="1" width="100%" border:1px white;>
   <tr class="row1">
      <td border:1px bordercolor:white>
var cssfeed=new gfeedpausescroller("example1", "example1class", 2000, "_new")
cssfeed.addFeed("Raidplanner", "http://www.lotro-latino.com/dkp/data/a43cb58b971a91182fb5fb3742d90db8/raidplan/rss.xml") //Specify "label" plus URL to RSS feed
cssfeed.displayoptions("date") //show the specified additional fields
cssfeed.displayoptions("description") //show the specified additional fields
cssfeed.setentrycontainer("div") //Wrap each entry with a DIV tag
cssfeed.filterfeed(10, "date") //Show 10 entries, sort by date
cssfeed.entries_per_page(1)
cssfeed.init()
</script>
      </td>
   </tr>
</table>
{$C_BLOCK_F_L}{$C_BLOCK_F_R}
And here's the CSS code I want to use:

Code: Select all

<style type="text/css">

.titlefield{ /*CSS for RSS title link in general*/
text-decoration: none;
}

.labelfield{ /*CSS for label field in general*/
color:brown;
font-size: 90%;
}

.datefield{ /*CSS for date field in general*/
color:gray;
font-size: 90%;
}

.descriptionfield{ /*CSS for date field in general*/
color:black;
font-size: 90%;
}

#rsstable{ /*main container*/
width: 450px;
height: 30px;
border: 0px solid black;
padding: 4px;
background-color: transparent;
}

code{ /*CSS for insructions*/
color: red;
}

</style>
How do I integrate both in the block .html?
Any help would be appreciated! thanks

Re: Block with its own CSS?

Posted: 17. July 2009 12:14
by Mike
You can include your css file in stylesheets.css or you cann add it in the overall_header.html...
You have to be sure that you use unique css classes to prevent problems with the Board. After that you have to change your classes in your Block to this unique names.

The other way it to add your css directly into the block code. (style="...")