I added a class to my themes css file:

.block-home-right {
background:#ffffff;
padding:0 0 0 0;
}

and entered 'block-home-right' on the block.

I've cleared cache and tried multiple variations and do not see the change nor does inspecting the element with Chrome do I see the new CSS being referenced. It still pulls the theme default.

Can someone help me figure out what I'm doing wrong?

Thanks

Comments

hollyh’s picture

same problem

Rugman’s picture

Similar Problem

I guess you guys were discussing provision of predefined classes as pull down menu, Hope you are implementing it soon. Its would make this module a must for all.

berenddeboer’s picture

Your theme's block.tpl.php is probably wrong.

Make sure it contains something like this:

class="<?php print $classes; ?>"

If you don't see a "print $classes" it won't work. All out of the box Drupal themes work.

berenddeboer’s picture

Status: Active » Closed (works as designed)
berenddeboer’s picture

Status: Closed (works as designed) » Closed (cannot reproduce)
spidersilk’s picture

Some Drupal 7 themes use $attributes rather than $classes - Omega is one popular example (version 3, at least - haven't checked version 4). So it won't work with this module out of the box, but a small edit to block.tpl.php will fix that:

In line 2, where it says:

<<?php print $tag; ?><?php print $attributes; ?>>

change that line to:

<<?php print $tag; ?> class="<?php print $classes; ?>"<?php print $attributes; ?>>

I adapted that from the equivalent template in Zen, which uses both $classes and $attributes, as above, and it seems to work.

s@ilor’s picture

Just tried #6, and it threw all other blocks and menu's around.