Change lay-out evenbox comments

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
Neut
Regular
Posts: 91
Joined: Sat Jun 17, 2006 7:51 pm
Location: NL, Earth
Contact:

Change lay-out evenbox comments

Post by Neut »

Comments boxes have a different layout (like background color), every other comment (oddbox en evenbox).
I'm looking where to change the evenbox layout.

I found this in STYLE.CSS (modded Carl's Andreas08-theme):

Code: Select all

/* used in comments */
.oddbox, .plugin_comment_wrap {
	margin:0 0 20px 0;
	border-top:1px dotted #CCCCCC;
	border-bottom:1px dotted #CCCCCC;
	background-color:#fafbfc; 
	color:#505050;
	line-height:1.5em; }

/* not used */
.evenbox {}

Evenbox seems not to be used, and indeed when I change this, same as the oddbox settings, nothing happens.

So, my question: Where can I activate what so that the evenbox setting will be used.
Who is General Failure, and why is he reading my disk?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Change lay-out evenbox comments

Post by garvinhicking »

Hi!

Many parts of the template support CSS classes, but don't actually use them. The odd/evenbox is one of those. It's supported, but not used.

So you can add it to your style.css with a fresh start. Maybe you just made a simple mistake. Can you show us your results so that we can see what you changed? You must make your browse reload the stylesheet with F5.

Regards,
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/
Neut
Regular
Posts: 91
Joined: Sat Jun 17, 2006 7:51 pm
Location: NL, Earth
Contact:

Post by Neut »

Hi,

Yeah I was aware of the page refresh (F5).

The idea was to give every other an extra touch by adding a small graphic. It's easy to do (background: url({TEMPLATE_PATH}img/....).
But, if I change this in the oddbox settings in de style.css (see earlier post), this also changes the background of the 'recent comments' in the side bar (through the serendipity_plugin_comments plugin). I don’t want this, so I thought of changing every even comment (the evenbox setting). But since that setting seems not to be used , I’m lost in how tos solve this.

Do I make any sense?
Who is General Failure, and why is he reading my disk?
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

You are making perfect sense.

The appearance of your odd numbered comments is controlled, as you know, by the class oddbox. Similarly, as Garvin pointed out, your even numbered comments are styled by the class evenbox, which you both realize is, although identified in your style.css, currently unused.

Your sidebar "recent comments" is styled by the class plugin_comment_wrap. The reason changes you make to oddbox comments are also reflected in your sidebar comments is that both styles are grouped, and share the same declarations.

Here is the relevant portion of your style.css as it presently exists:

Code: Select all

.oddbox, .plugin_comment_wrap {
	margin:0 0 10px 0;
	border-top:1px dotted #CCCCCC;
	border-bottom:1px dotted #CCCCCC;
	background-color:#c1c; 
	color:#505050;
	line-height:1.5em; }

/* not used */
.evenbox {}
The comma separating the 2 classes, followed by the declarations, makes them "grouped".

If you want to make unique changes to only oddbox comments, simply add declarations to only the oddbox style as follows:

Code: Select all

.oddbox {
    declaration1: value;
    declaration2: value:
}
Same thing applies to .evenbox, which, as shown is defined, but presently contains no declarations.
=Don=
Neut
Regular
Posts: 91
Joined: Sat Jun 17, 2006 7:51 pm
Location: NL, Earth
Contact:

Post by Neut »

Thanks Don! That was very learn- and helpful.
Who is General Failure, and why is he reading my disk?
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

You're welcome.
=Don=
Post Reply