Is there a way to add a select
element with my own styling to various websites? Many of them have heavily styled their existing select
elements, which do not have any classes.
How can I ensure that my customized select
does not inherit the styles from the specific website?
Based on the code snippet below, I anticipate that my_select
will not be affected by the default select
styling.
select {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
/* 50x more rules that i dont want to overwrite one by one */
}
<!-- Their select -->
<select>
<option value="">Their select</option>
</select>
<!-- Mine select -->
<select class="my_select" id="my_select">
<option value="">My select</option>
</select>