Skip to content
All Answers
General

How do I change the text selection highlight color on Squarespace?

The ::selection pseudo-element controls what color appears when a visitor highlights text on your site. By default it's the browser's blue, but you can match it to your brand palette.

Keep the contrast between background and text color high for accessibility. A subtle brand color at partial opacity works well without making selected text unreadable.

::selection {
  background: #e74c3c;
  color: #ffffff;
}
::-moz-selection {
  background: #e74c3c;
  color: #ffffff;
}
Generate this with our Color Palette toolTry it free →

Related Questions

General

How do I find the CSS selector for any element in Squarespace?

General

How do I change the background color of a specific section in Squarespace?

General

How do I hide a specific element by its ID in Squarespace?

General

How do I add a back-to-top button in Squarespace?

A little over your head?

No shame — this stuff is hard. Let the pros handle it.

Long Drive MarketingTalk to Long Drive Marketing →