Need Some CSS Help

Events happening in the community are now at Drupal community events on www.drupal.org.
Summitt Dweller's picture

Hi folks. I'm looking for a bit of quick help with a CSS issue I'm having in one of my Drupal sites. The root of the problem is that I've learned CSS from experience only, and never really understood precisely how to get the result I'm looking for.

The question... In the example below (taken from Firebug with angle brackets changed to square brackets) I want to specifically theme the "views-field-title" content and I've added the "STC-Announcements" CSS class to the block it appears in to help distinguish this particular title from all others. What would the CSS specification for this need to look like?

[div class="content"]
  [div class="view view-STC-Announcements view-id-STC_Announcements STC-Announcements view-dom-id-6"]
    ‌ ¶‌·‌·‌·‌·‌·‌·
     [div class="views-admin-links views-hide"]
‌       ¶‌·‌·‌·‌·‌¶‌·‌·‌¶‌·‌·‌¶‌·‌·‌·‌·‌·‌·
       [div class="view-content"]
‌         ¶‌·‌·‌·‌·‌·‌·‌·‌·
         [div class="views-row views-row-1 views-row-odd views-row-first views-row-last"]
‌           ¶‌·‌·‌·‌·‌·‌·‌¶‌·‌·
           [div class="views-field-title"]
‌             ¶‌·‌·‌¶‌·‌·The Views Field Title is...
           [div class="views-field-body"]
             ¶‌·‌·‌¶‌·‌·¶‌·‌·‌¶‌·‌·
...

I envisioned that a spec like this would work...

div.STC-Announcements .views-field-title {
  properties here
}

Am I way off-base? Thanks in advance.

Comments

Yep.

scottatdrake's picture

Unless I'm missing something, that sounds exactly right.

Hmmmm...

Summitt Dweller's picture

I was afraid of that. Must be an issue with the hierarchy of my CSS files? I'll play with that a bit and see what comes of it. Thanks.

Mark

Central Iowa Drupal Users Group

Group categories

Category

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week