First of all, I'm a beginner in Drupal thus this question refers to some basic aspects of theming.
To better visualize my "problem":
1) I'm adding a new, custom block to the page via Administration => Structure => Blocks
2) In the field "Block body" I'm adding some text (plain text)
3) I'm assigning this new block to a particular region in my theme
Now I go to my website to see the new block content. I use Mozilla's Firebug plug-in and see that the text from the "Block body" is presented within these tags:
<p>some text</p>
The style for paragraph tags is defined in normalize.css file which adds some margin that I want to remove for this specific part (I use Zen Starterkit theme).
And the question - how to apply such a change (styling differently the paragraph tag) so that I'm not messing up too much in the theme files and it's in line with Drupal theming principles?
My first idea was to:
1) go back to the "Block body" field
2) change "plain text" to "full HTML"
3) declare a specific class for this tag, i.e. <p class="whatever">some text</p>
4) add somewhere a definition for "p.whatever" selector, but where?
But maybe there's a totally different approach for such changes.
Thank you in advance for your help.
Cheers,
Robert
Comments
If you look at the generated
If you look at the generated html you will see the block has a id, something like block-block-1, so you could use css like
where to add such a css code
OK, that's a valid point and thank you for this. But where exactly I should add such a css code - i.e. would "blocks.css" file be suitable for it? Or I put it wherever I want to?
Cheers,
Robert
I tend to add a custom css
I tend to add a custom css file to the theme and add my changes there.