CSS ::selection glitch?

NSA

sudo apt-get thefuckout.tar.gz
Dec 9, 2011
715
86
Hello,

So for some reason when I highlight my button on the webpage it comes up as blue instead of pink.

803f67593f47451592eaedcf9e6ea478.png


Has anyone got any ideas as to why it's doing this?
If you want to see the CSS, you can see it here:

Thanks!
 

Sysode

Front-End Developer
Dec 11, 2012
1,673
848
EDIT; I've updated it.

Try adding this, not sure if it'll work but worth a try.

.button ::selection {
background: #F768A1; /* Safari */
}
.button ::-moz-selection {
background: #F768A1; /* Firefox */
}
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,638
2,393
Have you tried ::selection .button { instead?

I have this 'glitch' but I don't think it can be fixed. I've seen it on other sites too.
 

Sean

‫‫‫‫‫‫  ‫  Don't Worry, Be Happy
Dec 12, 2011
1,121
405


There is a way around this bug for Input fields by using div's instead of input and making the div contenteditable

eg
 

Users who are viewing this thread

Top