MyBB Community Forums

Full Version: change select text color ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

From the title I think my question is very clear  

So how ?
 
::selection {
color: green;
background: red;
}

Check for Mozilla. May be vendor prefix is required (if you are not using Autoprefixer)
(2019-06-24, 11:28 AM)M!X0R Wrote: [ -> ]From the title I think my question is very clear  
It's not Big Grin

Do you mean the select element - so the color of options within a drop down "<select ...><option ...>Text</option> ..."
or any selected input element with cursor focussed on?

The <select> drop down can be formatted in global.css, e.g.:
select { color: #012345; }

[ExiTuS]
(2019-06-24, 01:10 PM)[ExiTuS] Wrote: [ -> ]
(2019-06-24, 11:28 AM)M!X0R Wrote: [ -> ]From the title I think my question is very clear  
It's not Big Grin

Do you mean the select element - so the color of options within a drop down "<select ...><option ...>Text</option> ..."
or any selected input element with cursor focussed on?

The <select> drop down can be formatted in global.css, e.g.:
select { color: #012345; }

[ExiTuS]

I mean in this thread when you select what you wrote me the background color is Orange, By default the color is Blue how can I change it to any color I want ?
a:link {
	color: #0072BC;
	text-decoration: none;
}

a:visited {
	color: #0072BC;
	text-decoration: none;
}

a:hover,
a:active {
	color: #0072BC;
	text-decoration: underline;
}

global.css
Ok, the marked text is formatted in the pseudo element effone mentioned Smile

Cheers!
[ExiTuS]
I picked this code from your site.min.css and I added it to my global.css working 100%  Big Grin
::selection{
	background:#f8891f;
	background:#ff7500;
	color:#fff;
	text-shadow:none
}
You can also remove the whole CSS definition for simply go back to browser default color.
There is no need to define this element at all.

[ExiTuS]

EDIT:

BTW. Overriding the browser color of marked text is an absolutely useless "feature" with no value.
It's more than disturbing a common custom, it's a blow-up of CSS by increasing code lines and size Sad

[ExiTuS]