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.
 

Improve your online store with our extensions.
About: Squarespace Circle Leader since 2017. I value honesty, transparency, appreciation and great design ♥.
Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™.
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Buy me a coffee

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 Add to Home > Design > Custom CSS. If it doesn't work, please share site url to check.

.box-header {
   background: green !important;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

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

 

Improve your online store with our extensions.
About: Squarespace Circle Leader since 2017. I value honesty, transparency, appreciation and great design ♥.
Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™.
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Buy me a coffee

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.