CMS Development

JeffM
Member

Changing the color of a section in a landing page

I want to change the background color for one section on my landing page.  How can I do this?  I have added the html code below and it changes the color of two sections.

 

<style>
body {
background-color: red;
}
</style>

0 Upvotes
3 Replies 3
JeffM
Member

Changing the color of a section in a landing page

It did not work.  I edited the template, added customer html to section 4 and added the following code below.  Im guessing this is incorrect.  Can you please assist me as to where I'm supposed to add the html and exactly what to put in order to change the section to green.  Thank you.

 

<style>
body {
.section2 {background-color:green}
}
</style>

 

 

TRooInbound
Key Advisor

Changing the color of a section in a landing page

Hi @JeffM,

 

there is no need to go in HTML, 
just add class to that section Like this and edit template CSS and add required CSS.

 

for example,

I've added class name 'section2' with style added 'background-color:green'

 

so it will be shown as HTML as below in your style section/CSS template.

<style>
.section2 {
    background-color:green
}
</style>

Hope this work!

Thanks

TRooInbound
Key Advisor

Changing the color of a section in a landing page

HI @JeffM,

 

you have to give a uniqe class to each section and give background-color to that particular section, so it will work.

but you give the color whole body that's not written way.

 

.section1 {background-color:red}

.section2 {background-color:green}

 

Thanks,

 

0 Upvotes