Hello Jeff,

I'm trying to change padding for a single block in ".block-content" class. Not sure where to start. How to theme a single block?

Thank you in advance.

Comments

Jeff Burnz’s picture

Every block has an ID, such as #block-comment-recent for the recent comments block. You can grab this ID by using Firebug or viewing the source code and finding it on the main block wrapper. Use this ID to target the one block you are wanting to style.

Ideally you should subtheme Pixture Reloaded but thats not a trivial process for this theme and you only want to make this one small change, so do this:

1. Add a new css file to PR, call it custom.css (put it in the root)

2. In the info file add a reference to this file like this:

stylesheets[all][] = custom.css

3. Clear your sites cache and the file will load. Now you can start adding custom CSS to this file.

Something like:

#block-comment-recent .block-content {padding: 20px 10px;}

Vocabulo’s picture

Thanks Jeff. It worked great and allows to customize limitless number of elements in a simple way. PR is the best theme I've ever worked with.

fnikola’s picture

Yes, the instructions worked perfectly! Thanks Jeff.

haydeniv’s picture

Status: Active » Fixed

Worked for me too. Secret is to not put the custom.css file in the css folder. I could not get it to load unless the custom.css file was in the root of pixture_reloaded.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.