2

I am currently working on a webshop, I am using following CSS3 to change the style of selected content by following CSS:

::selection {
    background-color:#5f2f8f;
    color:white;
}

It does work, but when I press CTRL+A you still see the default selection on some spaces (the blue stuff).

Why is there still default selection style on some spaces after pressing CTRL+A?

Live demo

Image demo:

enter image description here

Daan
  • 2,680
  • 20
  • 39

1 Answers1

0

Question Duplicate of:Why does the CSS3 pseudo ::selection not change the color for all parts?

He said!

The only workaround I've been able to come up with is using " contenteditable " elements instead of "<input> "elements.

Originally Posted From : "ThinkingStiff"

Make sure to check out his Full post : CSS3 - How to style the selected text in textareas and inputs in Chrome?

Community
  • 1
  • 1
Pain
  • 185
  • 1
  • 2
  • 14