Jump to content
Sign in to follow this  
danceyrselfclean_admin

Adding a colour to post boxes behind text

Recommended Posts

danceyrselfclean_admin

Hi im looking to add a background colour to my posts so that the text shows up against that colour. At the moment posts have a transparent colour so you see the text against the background of the entire site. Any assistance would be greatly appreciated http://www.danceyrselfclean.com/

Share this post


Link to post
Share on other sites
catrina

You can add this CSS (to Custom Code > CSS Rules or your base.css file in the child theme):

#post div.post-excerpt {background-color: #YOURCOLOR; padding-left: 7px; padding-right: 7px;}

Replace YOURCOLOR with hex code for the color you want. This will change the background color of the post excerpt only, not the entire post. If you want to change the background of the entire individual post area instead, let me know.


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
danceyrselfclean_admin

Ok thanks, yeah ideally im looking to change the background colour of all posts

Share this post


Link to post
Share on other sites
catrina

Okay. You'll need to use this code instead:

#post {background-color: #YOURCOLOR; padding: 10px;}


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
danceyrselfclean_admin

Cheers ill give it a go. You can probably tell that im quite a novice at this but where might i find the Custom Code > CSS Rules or the base.css file in the child theme

Share this post


Link to post
Share on other sites
catrina

Find Custom Code in Settings and the base.css file is accessible if you activate PlatformBase (the child theme) in Appearance > Themes.


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
danceyrselfclean_admin

I must be doing it wrong, ive tried putting the code in the custom code part, in appearance/pageline settings/custom code but nothing happens

Share this post


Link to post
Share on other sites
kastelic

Do you have the free version because the Custom CSS in not available in that version. If you have the paid version you should have CSS Rules, Headerscripts, Footerscripts etc. If you do have the paid version, try using

.post
instead of
#post

. Install Firebug for Firefox or use the Chrome Inspector to target elements that you want to change via CSS :)

Share this post


Link to post
Share on other sites
danceyrselfclean_admin

Yeah im using the free version at the moment.Is it possible using the free version

Share this post


Link to post
Share on other sites
timlinson

You'd probably put it in the style.css file for the free version if it has one.

Share this post


Link to post
Share on other sites
danceyrselfclean_admin

Im not sure it does, well not one that i can find anyway. I may just have to purchase the pro version to achieve what im looking to do

Share this post


Link to post
Share on other sites
danceyrselfclean_admin

Thanks guys ive upgrade to the pro version now and have been able to achieve this by using the custom code CSS

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×