Check out this JSFiddle I created to showcase my issue: JSFiddle
I am currently working on a customized dropdown menu using an icomoon icon instead of a V. While the design looks great, the ::after pseudo-element for the parent container is causing issues with the select element.
<div class="select-style">
<select>
<option value="">...</option>
<option value="1365">Some term</option>";
</select>
</div>
CSS
.select-style {
width: 240px;
height: 26px;
border: 0;
padding: 0;
margin: 0;
position: relative;
&::after {
/*content: "\f107";
font-family: "icomoon";*/
content: "V";
font-size: 18px;
position: absolute;
right: 7px;
top: 0;
}
}
select {
width: 100%;
height: 24px;
border: 1px solid rgb(199, 199, 199);
border-radius: 3px;
background-color: transparent;
-webkit-appearance: none;
-moz-appearance: none;
text-indent: 1px;
text-overflow: "";
&::-ms-expand {
display: none;
}
}
I explored the option of using JavaScript to open the dropdown but that did not solve the problem. I also experimented with z-index to see if it would help, but the icon kept getting hidden even though the select element had a transparent background.
Is there a way to ensure that the custom icon remains visible above the select element without obstructing its functionality?