The select element arrow is customized :
.listbox_length_menu_datatable {
background-color: #E8E8E8;
border: none;
border-radius: 5px;
font-size: 0.58em;
font-weight: 650;
padding-left: 0.4rem !important;
padding-top: 0.1rem !important;
padding-bottom: 0.1rem !important;
padding-right: 1.5rem !important;
background-position: calc(100% - 0.75rem) center !important;
-moz-appearance: none !important;
-webkit-appearance: none !important;
appearance: none !important;
width: 50px !important;
}
.listbox_length_menu_datatable.medium {
background: url("data:image/svg+xml,<svg height='10px' width='10px' viewBox='0 0 16 16' fill='%23000000' xmlns='http://www.w3.org/2000/svg'><path d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/></svg>") no-repeat;
}
<select class="form-select listbox_length_menu_datatable medium">
<option value='5'>5</option>
<option value='10'>10</option>
<option value='20'>20</option>
<option value='30'>30</option>
<option value='-1'>Tous</option>
</select>
At runtime the arrow is a bit far from the right border :
I want it to be like this
How to achieve that ?
2
Answers
You are telling it to be positioned 100% left minus 0.75rem:
So change that as appropriate:
EG:
Each browser renders the "Select" element with its distinct style. To address this, you can reset all the styles for the "Select" element, enclose it within a "div" container, and apply all the styles within that container.