Page 1 of 1
Change lay-out evenbox comments
Posted: Sun Jun 03, 2007 11:54 pm
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.
Re: Change lay-out evenbox comments
Posted: Tue Jun 05, 2007 10:34 am
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
Posted: Wed Jun 06, 2007 10:27 pm
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?
Posted: Thu Jun 07, 2007 1:05 am
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.
Posted: Sun Jun 10, 2007 7:12 am
by Neut
Thanks Don! That was very learn- and helpful.
Posted: Sun Jun 10, 2007 8:31 pm
by Don Chambers
You're welcome.