Jump to content

How to isolate and edit text/words within index-section?

Recommended Posts

Hey @tuanphan ,

This is York Template Specific, I'm looking to edit the Navigation Title's within each Index-Section with CSS if possible.

For example, I'd like to turn this line:

"Retailer Management Service —"

Into:

Retailer Management Service—

Obviously, the template already has preset line breakpoints, but in a perfect world, I'd like to be able to break the line so each word is isolated on its own line, and have the ability to change the colour of each line of text. Eg: keep the text white and highlight the "—"

Is this possible with just CSS?

Thanks

Link to comment
  • Replies 11
  • Views 919
  • Created
  • Last Reply

@tuanphan

Ok, and from there how would you change the colour of each word or line?

Sorry I didn't realise the text box changed what I meant - Please see attached (one line vs 4 lines).

I did figure out a solution to break the lines of text up - if you add directly into the Navigation Title in between each word (it works too), I just don't know how to isolate and change the colour of each line of text - how would I isolate the dash under services to change its colour?

Sorry if this doesn't make sense!

screenshot-2019-09-01-at-42335-pm.png.355fabdb3aef7d1e11d617cd1c5d2404.png

screenshot-2019-09-01-at-42354-pm.png.23a70b4e9510c8cad9f1bb6419ba7d7d.png

Link to comment

@MrLoubser


 <span style="color:red;">Here is</span><span style="color:green;">the Title</span>

If you want break the line, you can use attribue: display: block;


<span style="color:red;display:block;">Here is</span><span style="color:green;display:block;">the Title</span>

However, If you need to do this for multiple titles, you should use the code below, which is better


 <span class="kl-line1">Here is</span><span class="kl-line2">the Title</span>

Then add below code to Home > Design > Custom CSS


.kl-line1 {
 color: red;
 display: block;
}
.kl-line2 {
 color: green;
 display: block;
}




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

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

@tuanphan

Ok, I understand adding the bottom code into the Custom CSS section, but could you please send me a screenshot or direction on where to insert into the title line of code?

Would it be in the advanced settings of each index page?

This is how I have the code atm (attached) - is this what you mean?

screenshot-2019-09-01-at-62256-pm.png.124522284c0de821cad440b92cb7d3f8.png

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.