I'm sure that this is simple but I don't know how to change the background color for one content type. My searches have said to make a node.tpl.php but I can't see one on the earthish theme.
I'm sure that this is simple but I don't know how to change the background color for one content type. My searches have said to make a node.tpl.php but I can't see one on the earthish theme.
Comments
Comment #1
MPARKER commentedComment #2
ishmael-sanchez commentedComment #3
ishmael-sanchez commentedHi Marley, I'm going to assume you sorted out how to do this but I'm documenting it in case this helps someone else down the line. There multiple ways to do this. One way is to use the existing CSS. In the $body_classes there are nodes specific classes you can use. For example you could write something like
.node-type-story #contentto style story nodes. You can also edit the node.tpl.php in your sub theme and add a class for the node type. Here is an example:<div id="node-<?php print $node->nid; ?>" class="node<?php if ($sticky) { print ' sticky'; } ?><?php if (!$status) { print ' node-unpublished'; } ?> clear-block <?php print $node->type; ?>">Then you can target the backgrounds in CSS (ie using .story) rather than having to create a template file.