I am trying to force the background (colour) of a specific section on my website homepage to be black as I have a countdown timer where the completion text will take up more vertical space meaning a gap opens up below the section which makes the white text unreadable. I have been trying to use different html/css to try and target the section in the photo attached and highlighted but I cannot seem to get it to work. Any help is appreciated!
Hello @CFCYPACWEB,
Thanks for writing in!
Based from your screenshot, there are two ways you can apply a custom css to change the color.
1.) You can use the element ID:
#introduction {
background-color: yellow;
}
2.) Or you can use the element class:
.x-section.cs-ta-center {
background-color: yellow;
}
For more css help, please check this out:
Thank you for the help!
I still couldn’t get it to override the element.style with the code options so for now I resorted to using !important to force the background to be black. I know it is against best practices but it is what works for now. Thank you again for your assistance!
You’re welcome, @CFCYPACWEB. Yes, it’s generally a best practice to not use the !important. But, there are use cases for that.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.