Hey everyone sorry if this is a n00b question but I have changed my theme's background color, but i can not for the life of me figure out how to change the blocks background colors, they show up as white blocks on my blue background...

I am using theme "marinelli"

I was thinking it may be something to do with block.tpl.php but I can't for the life of me figure out how to do it.

Thanks in advance for the help !

Comments

vegantriathlete’s picture

I hope that you are not trying to hack the marinelli theme directly (even though it is a contrib theme). Either you should create a sub-theme that uses marinelli as the base theme, or you should create a copy of the marinelli theme and do all the necessary find and replace to give a new name to your customized version of it. In the README.txt file on lines 20 and 21 it says:

It's highly recommended to customize the theme by creating a subtheme. In this way you will not loose
your changes when updating the theme to the next release.

How did you change the theme's background color? Are you using CSS? Did you use something like

body {
  background-color: green;
}

What browser are you using? FireFox uses the Firebug plugin and other browsers supply similar tools to let you look at elements on a page. One thing you can try is to use the tool to inspect one of the blocks you desire to restyle. Look for id or class information on that block and apply the styling in the CSS to that id or class. For instance you may see something like:

<div id="block-block-19" class="block block-block">{various html elements and text}</div>

You might try putting something in your CSS like

.block {
  background-color: red;
}

to style everything that has the "block" class, or

#block-block-19 {
  background-color: blue;
}

to style just that one block.

It looks like you want to modify the graphic.css file.

If you examine the block.tpl.php you should also be able to determine what ids and classes are used. It appears marinelli wraps blocks in the classes: defaultblock and blockcontent. You would probably want to use defaultblock to capture the whole background.

Perhaps I am getting way too technical for you already. But, I have to start with the questions somewhere.

odyseg’s picture

If you are styling a specific block I suggest you should have 'Firebug' plugin, if you are using firefox for you to be able to see the different id's of those block you are planing to style it's background. This is much handy to use instead of viewing all the source code of your page and look for the specific block id.