Reputation: 2351
I am trying to get a dropdown in particular style but I am not able to achieve it. This is what i want
I tried using <select>
and Material UI's SelectField
and applied border type to it's stype but that didn't work either. How can I get this border to work?
Upvotes: 1
Views: 14093
Reputation: 11
This problem is very common yet you not created any div for the element select.
There are two ways you can do
<html>
<head>
<style>
select.dropdown {
border: 1px solid black;
}
</style>
<body>
<div>
<select class="dropdown">
<option selected value="1">Option 1</option>
</select>
</div>
</body>
</html>
<html>
<head>
<style>
select.dropdown {
outline: 1px solid black;
}
</style>
<body>
<select class="dropdown">
<option selected value="1">Option 1</option>
</select>
</body>
</html>
I guess that should help you.
Upvotes: 1
Reputation: 145
Have you tried styling the select
select.dropdown {
border: 1px solid black;
}
<select class="dropdown">
<option selected value="1">Option 1</option>
</select>
Upvotes: 2