Streaming live at 10am (PST)

Change the colour of highlighted text


#1

Hi all! I’m new to Webflow :slight_smile:

Does anyone know how a I can change the colour of the background of a highlighted text? I found an old question (Change highlighted text color) and tried to enter the code in the custom code section as suggested by @perkristian . Unfortunately, it doesn’t seem to work at all! Any suggestions? Thanks a lot


#2

Hi there,

just add this code in the Head, changing “colour” for the hexadecimal value you want (the first one is the text, the second the highlighted background):

 <style>
 ::selection {color: #colour; background: #colour;}
 </style>

#3

Thanks a lot! Worked perfectly :slight_smile: