i am using select tag for dropdown menu, using css i made select box to be rounded corner, by doing this drop down menu remains square, i also want to turn that rounded corner.
here is the live demo
http://jsfiddle.net/ankurdhanuka/AwUHn/1/
HTML
<p class="formRight">
<span style="padding-right:100px">Lead Type: </span>
<select id="leadType" class="box2" name="lead_type">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</p>
CSS
.formRight select {
background: none repeat scroll 0 0 #FFFFFF;
border: 1px solid #E5E5E5;
border-radius: 5px 5px 5px 5px;
box-shadow: 0 0 10px #E8E8E8 inset;
height: 40px;
margin: 0 0 0 25px;
padding: 10px;
width: 110px;
}
Your Help will be appreciated. Thanks in advance.
You have to fix it, add padding-left: 0 too. And lastly your arrow causes a border-radius-top problem. You have to add border-radius to second li of a list.
Just add a container around all your select s and add a border to it.
There are many ways to design a <select> dropdown menu using CSS. The Dropdown Menu is mainly used to select an element from the list of elements. Each menu option can be defined by an <option> element that can nested inside the <select> element.
HTML) Use any element to open the dropdown content, e.g. a <span>, or a <button> element. Use a container element (like <div>) to create the dropdown content and add whatever you want inside of it. Wrap a <div> element around the elements to position the dropdown content correctly with CSS.
Please check the solution :
Live demo : https://jsfiddle.net/webx/2g5bydyo/
.selectWrapper{
border-radius:36px;
display:inline-block;
overflow:hidden;
background:#cccccc;
border:1px solid #cccccc;
}
.selectBox{
width:140px;
height:40px;
border:0px;
outline:none;
}
<div class="selectWrapper">
<select class="selectBox">
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
<option>Option 4</option>
</select>
</div>
This is my solution.
CSS
.selectBox{border-radius:4px;border:1px solid #AAAAAA;}
HTML
<select class="selectBox">
.............
</select>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With