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

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

Question

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

Edited by MrLoubser
Initial Revision

Share this post


Link to post

11 answers to this question

Recommended Posts

  • 0

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




Share this post


Link to post
  • 0

@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

Share this post


Link to post
  • 0

@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

Share this post


Link to post
  • 0

hmm, it doesn't seem to work - I must not be inputting it correctly, attached are screenshots of how I've set it up.

The text box won't accept it if I isolate each word as there are more than 100 characters.

Not really sure what to do from here.

screenshot-2019-09-01-at-85613-pm.png.11140504cca8cd1ea224f0f7b8721368.png

screenshot-2019-09-01-at-85958-pm.png.0574f41a91f64186e4848c41fafb7666.png

Share this post


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