Hi guys i have a simple drop down box which i have styled my self but i have no idea how to change the option width. So it looks like this :
As you can tell the drop down is way smaller then the actual box so i was wondering how i can edit this size and get rid of the blue around the box and change its colour. I'm using boostrap 3
HTML:
<div class="styled-select">
<select>
<option>Here is the first option</option>
<option>The second option</option>
<option>The thrid option</option>
</select>
<span class="fa fa-sort-desc"></span>
</div>
CSS:
.styled-select {
border: 1px solid #e6e6e6;
border-radius: 2px;
box-sizing: border-box;
overflow: hidden;
position: relative;
line-height: 20px;
color: #555555;
padding-left: 22px;
font-size: 13px;
font-family: Montserrat-Regular;
}
.styled-select option {
width: 74%;
}
.styled-select, .styled-select select {
width: 74%;
display: inline-block;
}
select:focus {
outline: none;
}
.styled-select select {
height: 40px;
padding: 5px 0 5px 5px;
background: transparent;
border: none;
-webkit-appearance: none;
}
#-moz-document url-prefix() {
.styled-select select {
width: 110%;
}
}
.fa-sort-desc {
position: absolute;
top: 12px;
right: 12px;
font-size: 24px;
}
select::-ms-expand {
display: none;
}
_:-o-prefocus,
.selector {
.styled-select {
background: none;
}
}
Instead of styling a div containing your select object, you should style the select object itself, for instance:
.styled-select {
border: 1px solid #e6e6e6;
border-radius: 2px;
box-sizing: border-box;
overflow: hidden;
position: relative;
line-height: 20px;
color: #555;
padding-left: 22px;
font-size: 13px;
font-family: Montserrat-Regular;
}
.styled-select option {
width: 74%;
}
.styled-select, .styled-select select {
width: 74%;
display: inline-block;
}
select:focus {
outline: none;
}
.styled-select select {
height: 40px;
padding: 5px 0 5px 5px;
background: transparent;
border: none;
-webkit-appearance: none;
}
#-moz-document url-prefix() {
.styled-select select {
width: 110%;
}
}
.fa-sort-desc {
position: absolute;
top: 12px;
right: 12px;
font-size: 24px;
}
select::-ms-expand {
display: none;
}
_:-o-prefocus .styled-select, .selector .styled-select {
background: none;
}
<select class="styled-select">
<option>Here is the first option</option>
<option>The second option</option>
<option>The thrid option</option>
</select>
Related
.select-color:before {
content: "\f0dd";
font: normal normal normal 26px/1 FontAwesome;
color: #d0415d;
right: 18px;
top: 4px;
height: 34px;
position: absolute;
pointer-events: none;
padding-right: 10px;
}
select {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 15px;
border-radius: 5px !important;
width: 100px;
height: 45px;
-webkit-appearance: button;
}
<div class="select-color">
<select id="first_m" >
<option ="1">1</option>
<option ="2">2</option>
<option ="3">3</option>
</select>月
</div>
First image doesn't show as normal element in firefox.
But below image does show as normal element in chrome.
You can set -moz-appearance: none and make the parrent .select-color relative.
.select-color:before {
content: "\f0dd";
font: normal normal normal 26px/1 FontAwesome;
color: #d0415d;
right: 18px;
top: 4px;
height: 34px;
position: absolute;
pointer-events: none;
padding-right: 10px;
}
.select-color {
display: inline-block;
position: relative;
}
select {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 15px;
border-radius: 5px !important;
width: 100px;
height: 45px;
-webkit-appearance: button;
-moz-appearance: none; // Added
}
<div class="select-color">
<select id="first_m" >
<option ="1">1</option>
<option ="2">2</option>
<option ="3">3</option>
</select>月
</div>
The problem is that the elements are not appearing next to each other as I want them to.
all three elements are already on float left and in the right order but they are still not lining up in the right way.
(so probably, the problem is that some elements are position:absolute or relative while they don't need to. The problem is: you can't change that without disrupting the drop-up menu of #Timer. That)
green_button {
background-color: #027fed;
color: white;
border-radius: 2px;
cursor: pointer;
float: right;
position: relative;
}
.green_button:active {
background-color: #eee;
color: black;
}
.keuze {
position: absolute;
width: 100px;
height: 100px;
float: left
}
#timer {
color: black;
background: #eee;
border: none;
padding-left: 10px;
font-size: 12px;
border-radius: 2px;
float: left;
padding: 12px 12px;
cursor: pointer;
list-style-type: none;
position: Relative;
margin-top: -14px;
width: 80px;
}
#timer:hover {
color: white;
background: #027fed;
}
li {
background-color: #eee;
font-size: inherit;
width: 150px;
position: relative;
float: left;
bottom: 31px;
left: 0;
display: block;
font-size: 12px;
text-decoration: none;
font-family: tahoma;
color: black;
width: 50px;
height: auto;
border: 1px solid #;
border-width: 1px 1px 0 0;
background: #eee;
background-color: rgb(238, 238, 238);
padding-left: 10px;
line-height: 38px;
border-radius: 2px;
height: auto;
line-height: 1em;
padding: 5px 10px;
width: 129px;
margin-bottom: 1px;
margin-left: 431px;
}
li:hover {
cursor: pointer;
background-color: #027fed;
color: white
}
.list {
display: none;
list-style-type: none;
position: absolute !important;
}
.keuze:hover .list {
display: block
}
.messages_compose {
padding: 10px;
margin-bottom: auto;
}
.messages_textarea_container {
display: inline-block;
width: 400px;
margin-left: 10px;
}
.messages_textarea {
border: 3px solid lightgray;
margin-top: 0;
margin-bottom: 10px;
padding: 5px;
width: 400px;
height: 40px;
resize: none;
float: left;
border-radius: 2px;
position: absolute;
}
.button {
border: none;
font-size: 12px;
padding: 12px 12px;
height: 40px text-align: center;
}
<div class="messages_compose">
<div class="vraag">CV</div>
<div class="messages_textarea_container">
<textarea class="messages_textarea"></textarea>
<button class="button green_button">Stuur</button>
<ul class="keuze">
<button id="timer">1 Jaar</button>
<div class="list">
<li id="jaar">jaar</li>
<li id="maand">maand</li>
<li id="week">week</li>
<li id="dag">dag</li>
</div>
</ul>
</div>
<script>
document.getElementById("jaar").onclick = function() {
jaar()
};
document.getElementById("maand").onclick = function() {
maand()
};
document.getElementById("week").onclick = function() {
week()
};
document.getElementById("dag").onclick = function() {
dag()
};
</script>
<script src="../scripten.js"></script>
</div>
If you want them side by side (if width allows), to make things simpler, make sure they are inline elements.
textarea and button are inline elements by default and unsorted-list are block element by default
Inline Elements
Block Elements
So basically, all you need is to change your ul to display: inline-block;
* {
padding: 0;
margin: 0;
vertical-align: text-top;
}
green_button {
background-color: #027fed;
color: white;
border-radius: 2px;
cursor: pointer;
}
.green_button:active {
background-color: #eee;
color: black;
}
.keuze {
display: inline-block; /* added */
width: 100px;
list-style: none;
}
.keuze li {
width: 100%;
}
#timer {
color: black;
background: #eee;
border: none;
padding-left: 10px;
font-size: 12px;
border-radius: 2px;
padding: 12px 12px;
cursor: pointer;
list-style-type: none;
width: 80px;
}
<div class="messages_compose">
<div class="vraag">CV</div>
<div class="messages_textarea_container">
<textarea class="messages_textarea"></textarea>
<button class="button green_button">Stuur</button>
<ul class="keuze">
<button id="timer">1 Jaar</button>
<div class="list">
<li id="jaar">jaar</li>
<li id="maand">maand</li>
<li id="week">week</li>
<li id="dag">dag</li>
</div>
</ul>
</div>
</div>
In addition, I have removed all your float and position from your css which I think as #Temani Afif says, you were just trying fix the issue by adding more to it.
I also have added followings just to make it tidier which is irrelevant to your issue. (That is to remove the default margin, padding and vertical align from all html elements to make it tidier and avoid unexpected behavior of different browsers)
* {
padding: 0;
margin: 0;
vertical-align: text-top;
}
I have added the demo as you can see below
2 options values usa and asia applied by default.
Firstly I needed to add placeholder to both the columns by default.
And placeholder should be different for each the tags how can I achieve this?
$('#countries').scombobox({
fullMatch: true
});
$('#continents').scombobox({
fullMatch: true,
highlight: false
});
body {
padding: 23px 0 0 0;
font-family: Arial, 'sans-serif';
font-size: 90%;
color: #333;
background: #FAFAFA;
}
.scombobox {
position: relative;
margin: 5px;
}
.scombobox select {
display: none;
}
.scombobox-display {
width: 100%;
height: 100%;
padding: 2px 4px;
border: 1px solid #CCC;
border-radius: 4px;
box-sizing: border-box;
-moz-box-sizing: border-box;
}
.scombobox-display:focus {
box-shadow: 0 0 3px #CCC;
outline: none;
}
.scombobox-display:disabled {
background: #F0F0F0;
}
.scombobox-display.scombobox-invalid {
background: #FFCCD4;
}
.scombobox-display-div {
border: 1px solid #CCC;
border-radius: 4px;
cursor: pointer;
}
.scombobox-display-div-holder {
padding: 2px;
}
.scombobox-display-div-item {
border: 1px solid #CCC;
margin: 2px;
border-radius: 4px;
float: left;
height: 100%;
max-width: 150px;
padding: 4px 18px 4px 8px;
position: relative;
vertical-align: middle;
white-space: nowrap;
overflow: hidden;
cursor: default;
background: #F8F8F8;
display: none;
}
.scombobox-display-div-item-text {
max-width: 140px;
overflow: hidden;
}
.scombobox-display-div-item-remove {
position: absolute;
right: 2px;
top: 2px;
background: #A0A0A0;
border-radius: 100px;
color: white;
cursor: pointer;
line-height: 90%;
padding: 1px 3px 0px;
}
.scombobox-display-div-item-remove:hover {
background: #408CBE;
}
.scombobox-display-div-item-remove:active {
background: #3075A3;
}
.scombobox-list {
display: none;
position: absolute;
max-height: 400px;
min-width: 100%;
max-width: 300%;
white-space: nowrap;
box-sizing: border-box;
-moz-box-sizing: border-box;
overflow-y: auto;
background: white;
border: 1px solid #CCC;
border-top: none;
/* instead of margin-top: -1px */
border-radius: 4px;
box-shadow: 0 0 3px #CCC;
z-index: 10;
}
.scombobox-list p {
cursor: pointer;
margin: 0;
padding: 5px;
}
.scombobox-list p input[type="checkbox"] {
margin-right: 8px;
vertical-align: middle;
}
.scombobox-list p:hover,
.scombobox-list p.scombobox-hovered {
background-color: #E9EFFC;
}
.scombobox-list p.scombobox-separator {
height: 2px;
padding: 0;
cursor: default;
background: #EEE;
}
.scombobox-list p.scombobox-header {
cursor: default;
background: #EEE;
}
.scombobox-dropdown-arrow {
position: absolute;
top: 0;
right: 0;
width: 20px;
height: 100%;
}
.scombobox-dropdown-arrow:hover {
opacity: 1;
filter: alpha(opacity=100);
}
.scombobox-dropdown-background {
position: absolute;
top: 0;
right: 0;
width: 20px;
height: 100%;
background: white;
border: 1px solid #CCC;
border-radius: 0 4px 4px 0;
border-left: none;
box-sizing: border-box;
-moz-box-sizing: border-box;
}
.scombobox-dropdown-background-invalid {
border-left: 1px solid #CCC;
}
.scombobox-marker {
background: #958FFF;
color: white;
border-radius: 2px;
padding: 0 2px;
margin: 0 2px;
}
.scombobox input[type="checkbox"] {
cursor: pointer;
}
.scombobox-disabled .scombobox-dropdown-background,
.scombobox-disabled .scombobox-dropdown-arrow {
display: none;
}
.scombobox-disabled .scombobox-display-div {
background: #F8F8F8;
cursor: default;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src='//cdn.rawgit.com/vijaykumarcmeseo/250f949a8de865b38e7e34bd9101e6f2/raw/670276916b77a4162e983e72aa2226cb645a6315/v.js' type='text/javascript'></script>
<script src='//cdn.rawgit.com/vijaykumarcmeseo/a9c7f54e83a228e54212c2c78a8b3422/raw/de75136be3a9beb9e4ab1538fd765e79acc58e00/lz.js' type='text/javascript'></script>
<select id="countries">
<option value="1"></option>
<option value="2">india</option>
</select>
<select id="continents">
<option value="1"></option>
<option value="2">northamerica</option>
</select>
Add an option with value="0" and selected
To hide the default value, given this is a jquery plugin, you need to use this:
.scombobox-display:focus + .scombobox-list p:first-of-type span {
display: none
}
$('#countries').scombobox({
fullMatch: true
});
$('#continents').scombobox({
fullMatch: true,
highlight: false
});
.scombobox-display:focus + .scombobox-list p:first-of-type span {
display: none
}
body {
padding: 23px 0 0 0;
font-family: Arial, 'sans-serif';
font-size: 90%;
color: #333;
background: #FAFAFA;
}
.scombobox {
position: relative;
margin: 5px;
}
.scombobox select {
display: none;
}
.scombobox-display {
width: 100%;
height: 100%;
padding: 2px 4px;
border: 1px solid #CCC;
border-radius: 4px;
box-sizing: border-box;
-moz-box-sizing: border-box;
}
.scombobox-display:focus {
box-shadow: 0 0 3px #CCC;
outline: none;
}
.scombobox-display:disabled {
background: #F0F0F0;
}
.scombobox-display.scombobox-invalid {
background: #FFCCD4;
}
.scombobox-display-div {
border: 1px solid #CCC;
border-radius: 4px;
cursor: pointer;
}
.scombobox-display-div-holder {
padding: 2px;
}
.scombobox-display-div-item {
border: 1px solid #CCC;
margin: 2px;
border-radius: 4px;
float: left;
height: 100%;
max-width: 150px;
padding: 4px 18px 4px 8px;
position: relative;
vertical-align: middle;
white-space: nowrap;
overflow: hidden;
cursor: default;
background: #F8F8F8;
display: none;
}
.scombobox-display-div-item-text {
max-width: 140px;
overflow: hidden;
}
.scombobox-display-div-item-remove {
position: absolute;
right: 2px;
top: 2px;
background: #A0A0A0;
border-radius: 100px;
color: white;
cursor: pointer;
line-height: 90%;
padding: 1px 3px 0px;
}
.scombobox-display-div-item-remove:hover {
background: #408CBE;
}
.scombobox-display-div-item-remove:active {
background: #3075A3;
}
.scombobox-list {
display: none;
position: absolute;
max-height: 400px;
min-width: 100%;
max-width: 300%;
white-space: nowrap;
box-sizing: border-box;
-moz-box-sizing: border-box;
overflow-y: auto;
background: white;
border: 1px solid #CCC;
border-top: none;
/* instead of margin-top: -1px */
border-radius: 4px;
box-shadow: 0 0 3px #CCC;
z-index: 10;
}
.scombobox-list p {
cursor: pointer;
margin: 0;
padding: 5px;
}
.scombobox-list p input[type="checkbox"] {
margin-right: 8px;
vertical-align: middle;
}
.scombobox-list p:hover,
.scombobox-list p.scombobox-hovered {
background-color: #E9EFFC;
}
.scombobox-list p.scombobox-separator {
height: 2px;
padding: 0;
cursor: default;
background: #EEE;
}
.scombobox-list p.scombobox-header {
cursor: default;
background: #EEE;
}
.scombobox-dropdown-arrow {
position: absolute;
top: 0;
right: 0;
width: 20px;
height: 100%;
}
.scombobox-dropdown-arrow:hover {
opacity: 1;
filter: alpha(opacity=100);
}
.scombobox-dropdown-background {
position: absolute;
top: 0;
right: 0;
width: 20px;
height: 100%;
background: white;
border: 1px solid #CCC;
border-radius: 0 4px 4px 0;
border-left: none;
box-sizing: border-box;
-moz-box-sizing: border-box;
}
.scombobox-dropdown-background-invalid {
border-left: 1px solid #CCC;
}
.scombobox-marker {
background: #958FFF;
color: white;
border-radius: 2px;
padding: 0 2px;
margin: 0 2px;
}
.scombobox input[type="checkbox"] {
cursor: pointer;
}
.scombobox-disabled .scombobox-dropdown-background,
.scombobox-disabled .scombobox-dropdown-arrow {
display: none;
}
.scombobox-disabled .scombobox-display-div {
background: #F8F8F8;
cursor: default;
}
i
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src='//cdn.rawgit.com/vijaykumarcmeseo/250f949a8de865b38e7e34bd9101e6f2/raw/670276916b77a4162e983e72aa2226cb645a6315/v.js' type='text/javascript'></script>
<script src='//cdn.rawgit.com/vijaykumarcmeseo/a9c7f54e83a228e54212c2c78a8b3422/raw/de75136be3a9beb9e4ab1538fd765e79acc58e00/lz.js' type='text/javascript'></script>
<select id="countries">
<option value="0" selected>Choose..</option>
<option value="1">usa</option>
<option value="2">india</option>
</select>
<select id="continents">
<option value="0" selected>Choose..</option>
<option value="1">asia</option>
<option value="2">northamerica</option>
</select>
<select id="countries">
<option style="font-size:20px;display:none;">Select a country</option>
<option value="1">usa</option>
<option value="2">india</option>
</select>
<select id="continents">
<option style="font-size:20px;display:none;" value="">Select a continent</option>
<option value="1">asia</option>
<option value="2">northamerica</option>
</select>
I have some CSS applied to a few divs. It looks all good on windows, but it behaves differently on Mac on the event of mouse over.
The behavior can be seen here. If you could manage opening it on Mac and on Windows you will notice the difference.
I would appreciate if some can tell me how can i make it behave similar as it behaves on windows. Again, i want it to behave as it behaves on Windows.
I will show my code here as well.
The html
<div class="goal" >
<div class="top-layer" >
<div class="component">
<select class="component-select">
<option value="">select me </option>
<option value="">option one</option>
<option value="">option two</option>
<option value="">option three</option>
</select>
<span id="width_tmp"></span>
</div>
<div class="period" >
<select class="period-select">
<option value="">something</option>
</select>
<span id="width_tmp"></span>
</div>
<div class="close clickable" >X</div>
</div>
and the CSS,
.noselect, .clickable {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.clickable {
cursor: pointer;
/*border: 1px solid transparent;*/
}
.clickable:hover {
/*border: 1px solid #4D7994;*/
background: #3f6379;
}
[contenteditable="true"].single-line {
white-space: nowrap;
overflow: hidden;
display: inline-block;
margin-bottom: -7px;
height: 12px;
max-width: 60px;
}
[contenteditable="true"].single-line br {
display:none;
}
[contenteditable="true"].single-line * {
display:inline;
white-space:nowrap;
}
.goal {
position: relative;
background: #5A8EAE;
width: 364px;
height: auto;
color: #F4F7F9;
float: left;
margin-right: 14px;
margin-bottom: 14px;
font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
}
.goal span[contenteditable=true] {
padding: 5px;
border: 1px solid #5A8EAE;
padding-left: 2px;
}
.goal span[contenteditable=true]:focus {
background-color: white;
color: black;
border: 1px solid #5A8EAE;
min-width: 10px;
}
.top-layer{
width: 100%;
height: 33px;
float: left;
font-size: 12px;
font-weight: bold;;
}
.component{
float: left;
width: 63%;
padding: 2.5% 3% 3% 2%;
}
.period{
float: left;
padding-top: 10px;
}
.close{
float: right;
padding: 2.8%;
border-left: 1px solid #9FBDCF;
}
select.period-select {
border: 0 !important; /*Removes border*/
-webkit-appearance: none; /*Removes default chrome and safari style*/
-moz-appearance: none; /* Removes Default Firefox style*/
/*background: #0088cc url(img/select-arrow.png) no-repeat 90% center;*/
text-indent: 0.01px; /* Removes default arrow from firefox*/
text-overflow: ""; /*Removes default arrow from firefox*/ /*My custom style for fonts*/
border-radius: 2px;
background-color: #5A8EAE;
color: white;
font-weight: bold;
width:auto;
direction: ltr;
float: right;
font-size: 12px;
padding: 3px 0;
margin-top: -6px;
}
select.period-select:hover, select.component-select:hover {
-webkit-appearance: menulist;
background-color: #3f6379;
color: white;
}
select.component-select {
border: 0 !important; /*Removes border*/
-webkit-appearance: none; /*Removes default chrome and safari style*/
-moz-appearance: none; /* Removes Default Firefox style*/
/*background: #0088cc url(img/select-arrow.png) no-repeat 90% center;*/
text-indent: 0.01px; /* Removes default arrow from firefox*/
text-overflow: ""; /*Removes default arrow from firefox*/ /*My custom style for fonts*/
color: #FFF;
background-color: #5A8EAE;
font-size: 12px;
font-weight: bold;
width:240px ;
padding: 3px 0;
margin-top: -6px;
padding-left:0px;
margin-left:0px;
}
select:hover {
cursor: pointer;
/*background: #0088cc url(img/select-arrow.png) no-repeat 90% center;*/
}
I just want to ask if its possible that the text in select is in italic then once the user chose an option, the text will change to normal? What I've done is when the uses is in select, the text is in normal style but once it focus out, the text change in to italic style. What I want is italic first then when the users chose, the text will change to normal. Here's the link to my work. help. Thanks in advance.
http://jsfiddle.net/franscla/xcd0smxj/
`HTML
<div class='select'><select >
<option>- Select subject -</option>
<option >Purchase</option>
<option style='height:50px;'>Be Our Partner</option>
<option>Technical Problems</option>
<option>Others</option>
</select></div>
CSS
.select {
margin-top:10px;
background: none repeat scroll 0 0 #fff;
border: 1px solid #455d74;
box-sizing: border-box;
display: inline-block;
height: 40px;
position: relative;
vertical-align: top;
width: 400px;
font-family:Arial;
}
.select > select {
background: none repeat scroll 0 0 #fff;
border: 0 none;
color: #7b7b7b;
display: block;
font-size:14px;
height: 35px;
line-height: 17px;
margin: 0;
padding: 9px 6px 5px 9px;
width: 100%;
font-style:italic;
}
.select > select:focus {
-moz-outline-radius: 2px;
color: #000;
outline: 0px solid #3fb6f2;
outline-offset: 0;
font-style:normal;
}
.select:before, .select:after {
content: "";
pointer-events: none;
position: absolute;
}
.select:before {
background: inherit;
bottom: 0;
right: 0;
top: 0;
width: 29px;
}
.select:after {
-moz-border-bottom-colors: none;
-moz-border-left-colors: none;
-moz-border-right-colors: none;
-moz-border-top-colors: none;
border-color: transparent transparent;
background: url(http://www.8bitsports.net/wp-content/themes/morning/functions/wpzoom/assets/images/jquery.selectBox-arrow.gif) no-repeat 100% 100%;
border-right: 5px solid transparent;
border-style: solid;
border-width: 5px;
height: 15px;
right: 6px;
top: 6px;
width: 10px;
}
`
I have tried this is what you want:
$(".select").focusout(function() {
$('select').addClass('newclass');
});
.newclass {
font-style: normal !important;
color: black !important;
}
.select {
margin-top: 10px;
background: none repeat scroll 0 0 #fff;
border: 1px solid #455d74;
box-sizing: border-box;
display: inline-block;
height: 40px;
position: relative;
vertical-align: top;
width: 400px;
font-family: Arial;
}
.select > select {
background: none repeat scroll 0 0 #fff;
border: 0 none;
color: #7b7b7b;
display: block;
font-size: 14px;
height: 35px;
line-height: 17px;
margin: 0;
padding: 9px 6px 5px 9px;
width: 100%;
font-style: italic;
}
.select > select:focus {
-moz-outline-radius: 2px;
color: #000;
outline: 0px solid #3fb6f2;
outline-offset: 0;
font-style: normal;
}
.select:before,
.select:after {
content: "";
pointer-events: none;
position: absolute;
}
.select:before {
background: inherit;
bottom: 0;
right: 0;
top: 0;
width: 29px;
}
.select:after {
-moz-border-bottom-colors: none;
-moz-border-left-colors: none;
-moz-border-right-colors: none;
-moz-border-top-colors: none;
border-color: transparent transparent;
background: url(http://www.8bitsports.net/wp-content/themes/morning/functions/wpzoom/assets/images/jquery.selectBox-arrow.gif) no-repeat 100% 100%;
border-right: 5px solid transparent;
border-style: solid;
border-width: 5px;
height: 15px;
right: 6px;
top: 6px;
width: 10px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<div class='select'>
<select>
<option>- Select subject -</option>
<option>Purchase</option>
<option style='height:50px;'>Be Our Partner</option>
<option>Technical Problems</option>
<option>Others</option>
</select>
</div>