Jump to content

Chaning color of a code block

Recommended Posts

Posted

Hello, 

I am looking to change this header to green but seem to be struggling on how to do so. Any help would be greatly appreciated! I have uploaded both the screen and the code. Where it say "Head Coach - Jim Meyer" -- I would like the background to be green and not blue.

 

Thanks!

Screenshot 2019-10-14 14.34.59.png

Screenshot 2019-10-14 14.35.29.png

  • Replies 9
  • Views 829
  • Created
  • Last Reply
Posted

You've only included a little of the code, but we need to see it all. Better still, provide us with a working link to your website so that we can see it in place. If your site isn't live yet, please set a site password and tell us what it is.
 

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

Posted

<div class="box-header">
STL Fire Baseball Academy - Head Coach - Jim Meyer
</div>
<br>
<div style="overflow-x:auto;">
<!-- CSS Code: Place this code in the document's head (between the 'head' tags) -->
<style>
table.GeneratedTable {
  width: 100%;
  font-size: 10pt;
  font-family: sans-serif;
  background-color: #ffffff;
  border-collapse: collapse;
  border-width: 1px;
  border-color: #000000;
  border-style: solid;
  color: #000000;
}

table.GeneratedTable td, table.GeneratedTable th {
  border-width: 1px;
  border-color: #000000;
  border-style: solid;
  padding: 3px;
}

table.GeneratedTable thead {
  background-color: #00ff01;
}
</style>

Posted

@mattBTL The first few lines of your Custom CSS (in Design > Custom CSS) look like this currently:

#SiteWrapper {
    font-family: Montserrat
}

.box-header {
    background-color: #2d84c1;
    color: #fff;
    font-family: Montserrat;
    font-weight: bold;
    padding: 5px 10px
}

Line 6 is setting the colour of the blue box (referred to as the 'box-header'). It affects all pages where you have the box header. If you want to change them all, simply change the blue colour (#2d84c1) to a green of your choice, for example rgb(10,108,85). 

If you only want to change the box headers on this page, then you can do it by adding this to the end of the Custom CSS. It refers to the unique Collection ID of this page:

#collection-5d9c90b131cb8f78a59ac156 .box-header {
  background-color: rgb(10,108,85);  
}

 

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

Posted

@paul2009

 

Paul, 

I did the same thing to try and change the orange and it shows that it switched when in the 'backend'. However, went I went to the page from the visitor POV, it changed back to orange.

Any solutions?

Thanks,

Matt

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.