1

I have a region within a site theme I'm working on, and would like the H2 title attribute to be white as opposed to the rest of the theme which calls for a blue. Can I use CSS to assign specific font size and color attributes to the title tag for that specific region/s within the theme?

1 Answer 1

1

You can use CSS to style the H2 tag inside a specific block.

Your block should have a unique ID, based on the name of the block.

Your CSS would look something like this:

<style>
#block-your-blockname h2 {
 color: white !important;
}
</style>

Note: you may not need "!important", and that CSS can go in your main CSS file if you want.

1
  • I'm sorry I missed this, thank you very much for responding, it was of course the right solution!
    – David
    Dec 18, 2012 at 1:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.