function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mandy08Mandy08 

CMSForce question on contentblocks...

Hello - I am trying the change the background color of the "sidebar" contentblock on my CMS page

and only the background behind my text changes color, not the whole side bar. I want my entire

sidebar background to remain a certain color. Any help is appreciated.

 

Thanks

Amanda

Best Answer chosen by Admin (Salesforce Developers) 
BulentBulent

 

<div style="background-color:orange">
  <c:contentblock name!"sidebar"/>
</div>

 

 

All Answers

David VPDavid VP

Just put a <div> tag around your <c:contentblock name!"sidebar"/> component and apply the CSS styling you need.

Mandy08Mandy08

where exactly - in the "page item" or on my template?

thanks

BulentBulent

in the visualforce template page.

Mandy08Mandy08

I tried that and it did not change anything, perhaps my css is not called out correctly in my template.

Could I trouble you for an example? I would really appreciate it.

 

Amanda

BulentBulent

 

<div style="background-color:orange">
  <c:contentblock name!"sidebar"/>
</div>

 

 

This was selected as the best answer
Mandy08Mandy08

Thanks - most helpful.

 

Amanda