1

I am using css selection selector on my blog to override the default behaviour of browser text selection.

The code I use for CSS is given below.

::-moz-selection { background: #ea0000; color: #fff; text-shadow: none; }
::selection { background: #ea0000; color: #fff; text-shadow: none; }

It works on Firefox and IE, but when using Chrome the selection overflows to other areas. Any ideas?

Here's how to test my problem from my blog: semihyagcioglu.com

Semih Yagcioglu
  • 4,011
  • 1
  • 26
  • 43

1 Answers1

1

You need to hide the overflow on your article elements:

article {
    overflow: hidden;
}

Example

James Donnelly
  • 126,410
  • 34
  • 208
  • 218