Sidebar Plugins and CSS (recent entries in particular)

Creating and modifying plugins.
Post Reply
Regular Joe

Sidebar Plugins and CSS (recent entries in particular)

Post by Regular Joe » Mon Dec 06, 2004 4:39 am

Hey,

I would like to use CSS to format the display of a particaular sidebar plugin (in this case recent entries). The stock code that is output looks like this;

Code: Select all

 <div class="serendipitySideBarItem sidebar_wrap_serendipity_plugin_recententries">
        <h3 class="serendipitySideBarTitle sidebar_title_serendipity_plugin_recententries">Recent Entries</h3>
        <div class="serendipitySideBarContent sidebar_content_serendipity_plugin_recententries">
            <a href="/archives/1-The-Most-Photographed-Day-of-Your-Life.html" title="The Most Photographed Day of Your Life">The Most Photographed Day of Your Life</a><br /><div class="serendipitySideBarDate">Tue, November 30 2004</div><br />
        </div>

    </div>


I don't understand why the class for the recent entries content has 2 statements in it ,"serendipitySideBarContent" followed bt a space and then "sidebar_content_serendipity_plugin_recententries". I am still learning CSS and am unaware of how to use a class statemant formatted like this.

Is there a way I can use this class to apply CSS to the recent entries title only?

I also noted that the class "serendipitySideBarDate" is available for the date portion of each entry, but it seems that no class is available for the title part.


Any help guidance or input is appreciated.

Regular Joe

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Sidebar Plugins and CSS (recent entries in particular)

Post by garvinhicking » Mon Dec 06, 2004 3:05 pm

Hi!

I don't understand why the class for the recent entries content has 2 statements in it ,"serendipitySideBarContent" followed bt a space and then "sidebar_content_serendipity_plugin_recententries". I am still learning CSS and am unaware of how to use a class statemant formatted like this.


The reason is that both classes applied to the CSS. The 'serendipitySideBarContent' is applied to ALL sidebar plugin contents, whereas the special CSS class 'sidebar_content_serendipity_plugin_recententries' is only applied to the recententries plugin.

This way you can put all plugin markup to the SidebarContent class, and all markup that is specific to recententries into '.sidebar_content_serendipity_plugin_recententries'.

I also noted that the class "serendipitySideBarDate" is available for the date portion of each entry, but it seems that no class is available for the title part.


There is, it's the "h4.serendipity_title" CSS class! :)

HTH,
Garvin.
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

Post Reply