Closed (fixed)
Project:
Pixture Reloaded
Version:
7.x-1.2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
17 Sep 2011 at 00:24 UTC
Updated:
18 Apr 2013 at 17:30 UTC
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
Comment #1
Jeff Burnz commentedEvery 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;}
Comment #2
Vocabulo commentedThanks 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.
Comment #3
fnikola commentedYes, the instructions worked perfectly! Thanks Jeff.
Comment #4
haydeniv commentedWorked 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.