This Is Your Brain on html readonly select
- September 13, 2021
A unique feature of this website is that it is not a static page, but a dynamic page that changes based on what you click. A select box is a box that you have full access to, or you can change the value of by clicking on each option.
While the select box is unique to this site, it’s very useful for us. The problem is that there’s no way to actually change the background of a select box. It’s just a gray-ish blue color, and is a bit hard to read. Another problem occurs when you’ve selected a value already and you then click on an option that is not what you want.
We need a way to change a select box background. Its a little like a dynamic drop-down box, but its actually just a gray box with a black background. I’d love to see a way to make the background of a select box a variable color.
Currently, our select box is set to a gray color. We want it to become a gray box with a black background. We have a few ideas, but a more elegant solution might well be a select option that has a background color set to a different color. For example, I would love to see a select option that has a background of gray and white, then grey and black, etc.
It seems that there is actually a way to do this. At first I thought it was just a hack, but I came across the following CSS hack to make a selected option background a different color.
A select option that has a background of gray and white would not only look much better than an all white option, but it would also allow for all kinds of cool effects, like a dark gray background and a lighter gray option.
The other fun thing about this hack is that it’s a bit different from the typical select option hacking. Although it can be used in conjunction with the CSS hack above.
That isn’t a small thing though. This is what makes html readonly selectors so cool. Although the idea of making a select option background a different color is pretty cool.
The main drawback to using html readonly selectors is that the css hack above isnt quite as useful for it. And while it can be used in conjunction with the css hack above, it isnt nearly as cool. The other cool difference is that you dont have to use that hack for this hack. Just use a normal select option hack instead.
However, there are also drawbacks. You can’t use this hack in conjunction with the css hack above. You must use the normal hack.