Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

How to change the color of a single word in the title of a gallery portfolio page?


Clodita

Question

Site URL: https://www.brigittematte.com/galerie

 

Hi there,

I'm using Squarespace 7.1 and I would like to change the color of a single word in the title of the gallery portfolio page. I managed to change the color of all titles with CSS code (see ref.picture) but I would like to apply this to all « vendue » word in that page. Is it possible to do that?

Thanks!

 

Site url : https://www.brigittematte.com/galerie

password : bridg_vip

 

1826927224_ScreenShot2021-04-22at4_36_54PM.thumb.png.0066cacc86f708d19f5c376ffda79591.png2140285007_ScreenShot2021-04-27at1_33_00PM.thumb.png.a231b1407fe510579ccd9246e90393c3.png

Capture d’écran 2021-04-27 à 15.30.07.png

Link to post
  • Answers 10
  • Created
  • Last Reply

Top Posters For This Question

10 answers to this question

Recommended Posts

  • 0

First, add this code to Design > Custom CSS

h3.portfolio-title span {color:red !important;}

Next, edit title to this

Laurentides, St-Donat, Pimbina — <span>Vendue</span>

 

Link to post
  • 0

Thank you for your help. So if I understand correctly, After adding the code , I should edit the title in this section? see ref. picture. If so, it's not working 😞1761712759_Capturedecran2021-04-29a11_51_22.png.be5587cfd7d4af42a795cd06be9fd30d.png

Link to post
  • 0
16 hours ago, Clodita said:

This is my first site, I can add custom CSS, but unfortunately I don't know how to add span tag.

 

You do in screenshot. I mean keep it & don't delete, we can check why it doesn't work easier

Link to post
  • 0
22 hours ago, Clodita said:

ah okay, edit title to this, then let me know. I will give new code

Laurentides, St-Donat, Pimbina | Vendue

 

Link to post
  • 0
On 5/6/2021 at 5:22 AM, Clodita said:

Hi, Do you have a new code? LMK 🙂  thanks!

 

Change | to #, and add this code to Code Injection Footer

<script>
  window.Squarespace.onInitialize(Y, () => {
  var title = document.querySelectorAll('.portfolio-title');
  for (var sf = 0; sf < title.length; ++sf) {
    var item = title[sf]; 
    item.innerHTML = item.innerText.replace(/#/g, '<br>');
  }
}); 
</script>

Code by Sf.digital. https://sf.digital/squarespace-solutions/how-can-i-add-line-breaks-to-gallery-grid-titles

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...