I am using a datalist to display some options, but I need to set the background of the options to white. I've tried playing around with the background-colour element, but no matter what I do the options always have a black background.
datalist {
position: absolute;
background-color: white;
font-family: sans-serif;
font-size: 0.8rem;
}
<html>
<head>
<link rel="stylesheet" href="test.css">
</head>
<body>
<input
list="datalist"
name="option"
id="input"
autocomplete="off"
>
<datalist id="datalist">
<option>Carrots</option>
<option>Brocolli</option>
<option>Lettuce</option>
</datalist>
</body>
</html>