Jump to content

Chaning color of a code block

Recommended Posts

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

Link to comment
  • Replies 9
  • Created
  • Last Reply

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.
 

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment

<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>

Link to comment

@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);  
}

 

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment

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.