Basically when I use Google chrome and highlight text on some websites, the highlight spans the entire width of the browser rather than just highlighting the text. How can C
You can't alter the machanism of the highlighting algorithm. The highlight spans through paddings and margins, which is annoying sometimes. What you could do is prevent any text selection with CSS
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;