I'm theming using the Omega HTML5 starterkit theme on Drupal 7, and I want to add CSS just to the main content region in nodes but not to the comments.
How do I do that? What is the class (or ID) for that?
In my own Omega subtheme, which is quite standard, page content with comments has this structure (closing tags omitted for brevity):
<article ... class="... node ..."> <div class="content clearfix"> <div class="field field-name-body ..."> (node body) <div class="field field-name-... ..."> (another node field I'm displaying) <div class="clearfix"> <nav class="links node-links clearfix"> <div id="comments" class="comment-wrapper">
So a CSS selector of:
node > content
would get you all the fields in the content, but not the comments. Or if you just want to style the body, you could choose it specifically.
Note that the
content class is used a number of different places in a page. Alternatively you might want to set up some default CSS for most of the node and style the
This is not profound: I just poked around with Firebug to figure it out.