How to set VW and VH value to select option

Viewed 254

Could someone tell me how to replace responsive bootstrap with VW and VH value for select option?

I'm trying to recreate as mentioned here. but I don't understand its basic usage.

I need my select option to be behave like in that link.

here is my normal bootstrap fiddle . But I don't want to use bootstrap

updated fiddle

my very minimal HTML structure

<select class="form-control" id="gender1">
    <option>Male</option>
    <option>Female</option>
</select>

Note: what i actually need is, select option should behave when resize according to DIV. I've given WIDTH and HEIGHT in VW for DIV

Thanks to all,

1 Answers

select{
  display: block;
  width: 100%; /* define the size of the width */
  max-width: 100vw; /* the width equal to screen larger */
}
<label for="gender1">I'm label</label>   
<select id="gender1">
  <option>Male</option>
  <option>Female</option>
</select>

Hello , here my code. You just need to modify the value of select width to change the size of options. I hope this will help you !

Related