Jump to content

Add a link to a text block - instead of the text

Go to solution Solved by NP3000,

Recommended Posts

Posted

Is it possible to make a text block (that has a background colour) a clickable link? 

Instead of the text being the link, I want the whole text block to be the link. 

Is this possible in CSS or is there a different way to achieve this? 

Thanks

Posted

Maybe you can try:
I give an example if it's still on the same page

In the section you want to go to, embed the following html code:

<a name="yourtext"></a>


Then in the text that you mean has a (background text), please block the entire text then navigate to the "link"
and in the url link enter the following:

#yourtext

then hit apply

I hope this help you

Posted (edited)

Thanks for your reply but I find your explanation hard to follow. Could you rewrite it please? 

Basically, I want the attached image of the intended text box to lose the underline on the text and make the whole box a clickable link. 

It needs to link to another page on the site.
 

Screen Shot 2023-02-01 at 13.35.50.png

Edited by NP3000
Posted

unfortunately for that I haven't found the best way, but if you want to remove the underline link in the text you can use this code:

remove the text in all text that has underlined links:

a {
text-decoration: none !important;
}

will remove the text in certain blocks:

#yourblock {
text-decoration: none !important;
}

replace #yourblock with block on your site, to see block use squarespace id finder plugin

  • Solution
Posted

Thanks for the trying YogaP and thanks for the underline code tip. 

I came up with a work around.

Ive overlaid a blank png with the link added to it. No code needed. 

Nick: 1 - Squarespace: 0. 

I'm really sick of Squarespace's awkwardness. 

  • 8 months later...
Posted
On 2/1/2023 at 2:35 PM, yogap said:

unfortunately for that I haven't found the best way, but if you want to remove the underline link in the text you can use this code:

remove the text in all text that has underlined links:

a {
text-decoration: none !important;
}

will remove the text in certain blocks:

#yourblock {
text-decoration: none !important;
}

replace #yourblock with block on your site, to see block use squarespace id finder plugin

Hi @yogap 

Where do I put this code if I only want it to be applied to one page?

thanks

Posted (edited)

@yogap

I would like to remove the text underline links to the 4 x test groups under each image on this page

https://badger-oval-74a3.squarespace.com/designer-collaborations

I have tried to add in the below code to 

website tools > Code Injection > footer

 

#block-b624dfc453874ee21e28 {

text-decoration: none !important;

}

 

but it is not working? can you help?

 

If I want to do for the 4 x texts under images do I need to add each code seperately or could I add something like this 

#block-b624dfc453874ee21e28; #block-a5b28ca96a6dcc78cb3c; #block-3044362343bd7e9a4d9c; #block-eb1b21d942af59993e6a

text-decoration: none !important;

}

 

does it matter that I have other code in there too? [sorry if this a silly question but coding is not my field!]

Thanks

Edited by NicolaH
Posted
On 10/10/2023 at 1:01 AM, NicolaH said:

 

I would like to remove the text underline links to the 4 x test groups under each image on this page

https://badger-oval-74a3.squarespace.com/designer-collaborations

I have tried to add in the below code to 

website tools > Code Injection > footer

 

#block-b624dfc453874ee21e28 {

text-decoration: none !important;

}

 

but it is not working? can you help?

 

If I want to do for the 4 x texts under images do I need to add each code seperately or could I add something like this 

#block-b624dfc453874ee21e28; #block-a5b28ca96a6dcc78cb3c; #block-3044362343bd7e9a4d9c; #block-eb1b21d942af59993e6a

text-decoration: none !important;

}

 

does it matter that I have other code in there too? [sorry if this a silly question but coding is not my field!]

Thanks

What is password?

image.png.6103d0687d379704a83d48ec5d5631ff.png

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

Create an account or sign in to comment

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

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