JSFiddle - React, Tailwind, and code Playground
by ninty9notout
HTML
<div class="row clearfix">
<label for="CountyTab" class="label">County: </label>
<select id="CountyTab">
<option value="">Choose one</option>
<option value="Antrim">Antrim</option>
<option value="Westmeath">Westmeath</option>
<option value="Wexford">Wexford</option>
<option value="Wicklow">Wicklow</option>
</select>
</div>
CSS
label { color: #c0c0c0; }
label:hover { color: #0050ff; }
.row { padding-left: 26%; position: relative; }
.row .label { left: 0; position: absolute; width: 25%; }
.clearfix:before, .clearfix:after { content: " "; display: table; }
.clearfix:after { clear: both; }
.clearfix { *zoom: 1; }
JavaScript
document.getElementById("CountyTab").onchange = function(e) {
alert(e.target.value);
}