0

I have a question and I need help...

There is something that I have to make as a Homework. I must make a simple HTML/CSS/Bootstrap Hotel room reservation page. There is a form that I don't really know how to make it. One of the forms is a select option dropdown button. They want from me to make a bigger than normal arrow and I don't know how to make this arrow bigger.

Posting my code here:

HTML

<label class="control-label">Nationality</label><br>

<select class="options izbor" name="country">
   <option value="България">Bulgaria</option>
   <option value="Румъния">Germany</option>
   <option value="Гърция">Russia</option>
   <option value="Сърбия">England</option>
</select>

CSS

.izbor {
    display: block;
    width: 100%;
    height: 34px;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.42857143;
    color: #555;
    background-color: #fff;
    background-image: none;
    border: 1px solid #b7b7b7;
    border-radius: 0px;
    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
    -webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
    -o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
    transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
}
Jason Krs
  • 704
  • 2
  • 9
  • 30
valio957
  • 9
  • 2
  • 4
  • If you want to make your custom styles for select element then check this out. https://stackoverflow.com/questions/45436182/drop-down-menu-with-triangel-arrow/45437076#45437076 – JSEvgeny Aug 04 '17 at 07:34

2 Answers2

6

Try This, Quick and easy method,

select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: url("http://cdn1.iconfinder.com/data/icons/cc_mono_icon_set/blacks/16x16/br_down.png") white no-repeat 96% !important;
 
}

select::-ms-expand { display: none; }
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.css" rel="stylesheet"/>

<div class="container">
  <div class="row">
    <div class="col-xs-6">
      <select class="form-control">
       <option>Option 1</option>
       <option>Option 2</option>
       <option>Option 3</option>
      </select>
    </div>
  </div>
</div>
codesayan
  • 1,705
  • 11
  • 22
1

I created this code for you, which hides the default arrow and instead puts another image. The image I have chosen is a bit stupid as it includes some text, but you can replace to use something better you have.

.izbor {
  display: block;
  width: 90%;
  height: 34px;
  padding: 6px 12px;
  font-size: 14px;
  line-height: 1.42857143;
  color: #555;
  background-color: #fff;
  background-image: none;
  border: 1px solid #b7b7b7;
  border-radius: 0px;
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
  -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
  -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}

select.izbor{
  border: 1px solid red;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: url(https://upload.wikimedia.org/wikipedia/en/5/57/DownArrow.png);
  overflow: hidden;
  background-repeat: no-repeat;
  background-size: 80px 30px;
  background-position: right;
}
<label class="control-label">Nationality</label>
<br>
<select class="options izbor" name="country">
  <option value="България">Bulgaria</option>
  <option value="Румъния">Germany</option>
  <option value="Гърция">Russia</option>
  <option value="Сърбия">England</option>
</select>
Happysmithers
  • 733
  • 2
  • 8
  • 13