Remove Underline from Links

What does this code do?

This code snippet will allow you to remove the underline from links in Squarespace.

 

Code Snippets

Squarespace 7.0

Copy and paste the appropriate code into Design > Custom CSS

/* All Links */
a {
  border: none !important;
}

/* Specific Links */
SELECTOR a {
  border: none !important;
}

This may differ template to template. If the above doesn’t work, try replacing

border: none !important;

with

text-decoration: none !important;
 

If targeting specific links, then change the word SELECTOR to one of the selectors below.

/* Header */
header

/* Footer */
footer

/* The Top Footer Section */
.Footer-blocks--top

/* The Middle Footer Section */
.Footer-blocks--middle

/* The Bottom Footer Section */
.Footer-blocks--bottom

/* One Page */
#COLLECTIONID

/* One Section */
#PAGEID

/* One Text Block */
#BLOCKID

Squarespace 7.1

Copy and paste the appropriate code into Design > Custom CSS

/* All Links */
a {
  text-decoration: none !important;
  background-image: none !important;
}


/* Links in the Header */
header a {
  text-decoration: none !important;
  background-image: none !important;
}

/* Specific Links */
SELECTOR a {
  text-decoration: none !important;
  background-image: none !important;
}

If targeting specific links, then change the word SELECTOR to one of the selectors below.

/* Header */
header

/* Footer */
footer

/* One Page */
#COLLECTIONID

/* One Section */
#COLLECTIONID #page .page-section:nth-of-type(1)

/* One Text Block */
#BLOCKID
 

How To Use It

  1. Copy and paste the code as indicated above.

  2. If targeting specific links, choose the selector that matches your situation.

  3. To learn how to find a collection id, page id, or block id check out our Start Here guide.

  4. If targeting one section in Squarespace 7.1, change the 1 to match the section you are trying to change.

Rebecca Grace

Rebecca Grace is a Squarespace CSS Expert and Website Designer.

https://rebeccagracedesigns.com
Previous
Previous

Two Items Beside Each Other in a Form

Next
Next

Custom Cart Icon | Squarespace 7.1