I tried to add class for example bigred in the class box, but it dissapears when i configure the module again. The class does not stick

Can you help

Comments

todd nienkerk’s picture

I suggest uninstalling the module, deleting it, and installing the 6.x-1.x branch instead.

dietman’s picture

Version: 6.x-2.x-dev » 6.x-1.3

Ok i changed it to 1.3 version

but still I input in the css box of the module this pictureonlycss

and it does not show up, i looked at the source code, tried firebug, everything

why?

todd nienkerk’s picture

Component: Miscellaneous » Code
Category: feature » support

Have you changed your theme's block.tpl.php file to output the classes? You need to add one of the following snippets to that file:

print $block_classes;

print block_class($block);

The end result should look something like these (examples taken from Garland):

<div id="block-<?php print $block->module .'-'. $block->delta; ?>" class="clear-block block block-<?php print $block->module ?> <?php print $block_classes; ?>">

<div id="block-<?php print $block->module .'-'. $block->delta; ?>" class="clear-block block block-<?php print $block->module ?> <?php print block_class($block); ?>">

dietman’s picture

Here is what i have in my block tpl file, is this the reason css is not showing up?

<?php
// $Id: block.tpl.php,v 1.3 2007/08/07 08:39:36 goba Exp $
?>
  <div class="block block-<?php print $block->module; ?>" id="block-<?php print $block->module; ?>-<?php print $block->delta; ?>">
    <h2 class="title"><?php print $block->subject; ?></h2>
    <div class="content"><?php print $block->content; ?></div>
 </div>
dietman’s picture

ok i fixed it, but how do i call it the easiest way

The div is very long, can you help me please

<div class="block block-block" id="block-block-2 skinnypods">

How do i call it with css this is not working

#block-block-2 skinnypods

I only want to use skinnypods, because that way i will be able to move the block around and will always be able to call it. ??

todd nienkerk’s picture

You put the PHP snippet in the wrong place. A <div> cannot have more than one id="" value. Move the snippet inside class="".

If you need help learning how to use CSS, please consult an online tutorial, book, or other reference.

dietman’s picture

ok i have changed it, is this correct? I am sorry i am still learning css

<div class="block block-block skinnypods" id="block-block-2 ">

Everything is messed up, do I need to remove the id="block-block-2 from the code completely?

And how to I call each individual block, .block or #block is not working

todd nienkerk’s picture

Status: Active » Fixed

The markup you pasted in should work. You now need to use CSS to style the .skinnypods class.

dietman’s picture

thank you for your help

when updating do i need to keep the old files intact?

dietman’s picture

I used this on login block, put the name loginmodule in the box and it does not show up

the code is this

<div class="leftblocks">
          <div class="block block-user " id="block-user-1 ">

It does now show up at all.

todd nienkerk’s picture

Please be sure you have added the snippet above to whatever theme you're using. Chances are you haven't added the snippet properly or haven't added it to the theme you're using.

dietman’s picture

i am sorry, it was not login block but admin block, sorry, it works great

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.