Forum Discussion

JasonHill's avatar
13 years ago

Change background colour on an individual Custom Content box

I'd like to change the background colour on an individual Custom Content box without it affecting the appearance of the rest of the community.

 

I thought I might be able to just use a  bgcolor tag but it doesn't seem to work - probably being overridden by the default community style.

 

Anyone know whether its possible?


Thanks,

 

Jason

3 Replies

  • Hi Jason,

    best is probably to apply a CSS class to the custom component's HTML element and then apply the background-color:-styling via the community style CSS.

  • KaelaC's avatar
    KaelaC
    Lithium Alumni (Retired)
    13 years ago

    Each component should have a class on it that includes the name of the component.  For example on this page, the breadcrumb at the top is wrapped with div with a class called "lia-component-common-widget-breadcrumb".  You should be abled to use these classes to specifically style an individual component.  For a custom content area you will likely need to add a div inside your custom content and style that.  All custom content areas have the same class on them "lia-component-common-widget-custom-content".