Use a class on a DIV on specific content with Omega I'm using Drupal 7 and my theme is Omega. I have got a class "mask" and its CSS code is like so:

.mask {
    background:url("../img/header_mask.png") repeat-x scroll 0 0 transparent;
    height:200px;
    position:absolute;
    top:0;
    width:100%!important;
    z-index:101
}


I'm creating a class on Omega theme options to show content top, but my div shows on every page. So, I want show this class only on node pages.

This is my node.tpl.php:
&lt;div id="node-&lt;?php print $node-&gt;nid; ?&gt;" class="&lt;?php print $classes; ?&gt; clearfix"&lt;?php print $attributes; ?&gt;&gt;

  &lt;?php print $user_picture; ?&gt;

  &lt;?php print render($title_prefix); ?&gt;
  &lt;?php if (!$page): ?&gt;
    &lt;h2&lt;?php print $title_attributes; ?&gt;&gt;&lt;a href="&lt;?php print $node_url; ?&gt;"&gt;&lt;?php print $title; ?&gt;&lt;/a&gt;&lt;/h2&gt;
  &lt;?php endif; ?&gt;
  &lt;?php print render($title_suffix); ?&gt;

  &lt;?php if ($display_submitted): ?&gt;
    &lt;div class="submitted"&gt;
      &lt;?php print $submitted; ?&gt;
    &lt;/div&gt;
  &lt;?php endif; ?&gt;

  &lt;div class="content"&lt;?php print $content_attributes; ?&gt;&gt;
    &lt;?php
      // We hide the comments and links now so that we can render them later.
      hide($content['comments']);
      hide($content['links']);
      print render($content);
    ?&gt;
  &lt;/div&gt;

  &lt;?php print render($content['links']); ?&gt;

  &lt;?php print render($content['comments']); ?&gt;

&lt;/div&gt;


Where should I add my "mask" class in this code?
You don't mention if it's a particular node TYPE that you're after.  If it is, then please clarify that.  You also don't say what the .mask div actually contains, so I'm going to assume it contains nothing and the content is the background image.  If this is the case then you can just put &lt;div class="mask"&gt;&lt;/div&gt; anywhere.  The position: absolute should mean that it won't dislodge any other content anyway.

I'm also not sure why you need !important after width.  If this class is something you're declaring then it shouldn't get overriden unless YOU want it to.  If you're worried about it then I'd namespace the class instead (ie .mytheme-mask).

EDIT

Put it anywhere, but write it like this:

&lt;?php if (!drupal_is_front_page() &amp;&amp; !$teaser) { ?&gt;
  &lt;div class="mask"&gt;&lt;/div&gt;
&lt;?php };?&gt;


This means that if the page is a content page (not the front page) and not a teaser then place your div in the node.