Community & Support

All my blocks have div of defaultblock

I would like to use some css to change individual blocks. However using firebug, all of my blocks have a div id of defaultblock. how can i assign ids to specific blocks so that i can then add css?
I am using the marinelli theme.

Comments

I would look at the themes

I would look at the themes block.tpl.php file, Garlands file looks like

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

<?php if (!empty($block->subject)): ?>
  <h2><?php print $block->subject ?></h2>
<?php endif;?>

  <div class="content"><?php print $block->content ?></div>
</div>

and you can see how the set both id and class.

the marinelli block.tpl.php

the marinelli block.tpl.php file is this

<div class="defaultblock">
    <h2><?php print $block->subject; ?></h2><!--block title-->
   <div class="blockcontent"><?php print $block->content; ?></div>
</div>

do i just subsitute in the garland coding?

----------------------------------------------------
www.meshowventures.com

I would use

<div id="block-<?php print $block->module .'-'. $block->delta; ?>" class="defaultblock">
    <h2><?php print $block->subject; ?></h2><!--block title-->
   <div class="blockcontent"><?php print $block->content; ?></div>
</div>

this way existing theming for blocks will continue to work.
You could also try this for the first div
<div id="block-<?php print $block->module .'-'. $block->delta; ?>" class="defaultblock clear-block block block-<?php print $block->module ?>">

that works great. thanks

that works great. thanks

----------------------------------------------------
www.meshowventures.com

This code should be part of the main Marinelli

This code should be part of the main Marinelli, this would solve the issue !!!

nobody click here