Change selection color
2 posts
Page 1 of 1
Hey,
//Originally posted on my site but I decided to share with CodenStuff members too.
//Original topic can be found here: http://codexvideos.com/viewtopic.php?f=23&t=163
Ever wondered how some sites change the selection color when you highlight some word or sentence ?
In this tutorial we are going to show you how to change the selection color to which ever color you want.
Step 1
Open your CSS file
If you are not using a CSS file then just add the code in Step 2 between
Insert this code
CodexVideos
//Originally posted on my site but I decided to share with CodenStuff members too.
//Original topic can be found here: http://codexvideos.com/viewtopic.php?f=23&t=163
Ever wondered how some sites change the selection color when you highlight some word or sentence ?
In this tutorial we are going to show you how to change the selection color to which ever color you want.
Step 1
Open your CSS file
If you are not using a CSS file then just add the code in Step 2 between
Code: Select all
Step 2<style type="text/css"> </style>
Insert this code
Code: Select all
Now let's split the code in 3 parts,
::selection {
color: white;
background-color: #D33;
text-shadow: none;
}
- Code: Select allThis code will set the text's color when it's highlighted/selected to white, you can change this to whatever color you want.
color: white;
Code: Select allThis code will set the selection color when text is highlighted/selected to #D33 (red), you can also change this to your preferred color.background-color: #D33;
Code: Select allNow this code is not needed if you don't have any shadows on the text, but if you do, this will make the selection 'prettier'.text-shadow: none;
CodexVideos
We shall let the revolution begin.. the revolution for freedom, freedom against censorship. We shall fight in the fields and in the streets, we shall fight in the hills; we shall never surrender
2 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023