Background of a post – how?

Posted in: Newspaper
Post count: 3

Hi guys,

I’ve been playing a lot with colors, settings and I can’t seem to figure this one out. How can I get an effect similar to this site https://stronglifts.com/barbell-row/5 where the content of the posts sits on color A (white) within color B (gray). And also, if that above is possible, how could I make a frame around color A (i.e. red thin rounding line around the white area) so there’s a transition between color A & B?

Much thanks!

Post count: 20688

Hi,

You could set a background color in the theme panel
https://www.screencast.com/t/tYo5a4Oj
It will apply on all the website including posts. A shadow could be added like this for example
https://www.screencast.com/t/Dfa71d5VcSk
This is the code used in the example if you want to use it (modify the values how you want), enter it in Theme panel->Custom CSS and it will apply only on post pages the way it is now. A theme background must be set in the theme panel for it to work properly.

@media (min-width: 1180px) {
.single.td-boxed-layout #td-outer-wrap {
width: 1164px;
margin: 0 auto;
-webkit-box-shadow: 0 0 5px 0 rgba(255,0,0,1);
-moz-box-shadow: 0 0 5px 0 rgba(255,0,0,1);
box-shadow: 0 0 5px 0 rgba(255,0,0,1);
}}

Please correct me if I misunderstood something.

Thanks

Post count: 3

Hi Simion,

Thanks for help! I tried background color, but exactly like you said – it changes color on entire website including posts. What I’m looking for is an additional container I suppose that would create effect similar to this (edited your image) http://prntscr.com/g6thnn and inside the bright green I can fill any color. It’s more than a shadow – not sure how https://stronglifts.com/barbell-row/5 do it.

Any advice ?

Thanks!

Post count: 20688

Hi,

A background cannot be set only for posts, it can be set in general. You could use the primary category setting. If you set a primary category for posts, all the posts form that category will inherit the background set for that particular category
https://forum.tagdiv.com/primary-category/
The article content is always white, it could only be changed with custom code. Extra container cannot be created, that would require serious modifications to the theme files.
You could use the browser inspector to identify the elements on the page and the classes used to create custom code
https://forum.tagdiv.com/create-custom-code-using-the-browsers-inspector/
So you can use the primary category to make the posts inherit the background color of the category, and use the border shadow code provided, or modify it as you wish.

Thanks

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.