0

I'm using dropkick jQuery plugin

I know, that dk_toggle has default width: 220px:

      <a class="dk_toggle" style="width: 220px; ">(from Google console)

My html in my view:

     <select name="country" class="default" tabindex="2">
          <option value="EN">English</option>
          <option value="IS">Israeli</option>
          <option value="UA">Ukrainian</option>
        </select>

But I want to change it in my css file:

 .dk_toggle {
 height: 15px;
 width: 245px;
}

It isn't changing. So HOW I should change it ?

Denys Medynskyi
  • 2,353
  • 8
  • 39
  • 70

2 Answers2

3

In your javascript file add

$(document).ready(function() {
    $('.dk_toggle').css('width','220px');
})
napolux
  • 15,574
  • 9
  • 51
  • 70
2

First, set an ID to your select:

 <select id="my_select" name="country" class="default" tabindex="2">
      <option value="EN">English</option>
      <option value="IS">Israeli</option>
      <option value="UA">Ukrainian</option>
 </select>

Then set a CSS for this ID:

#my_select{
  width: 200px;
}

I just tested it, and probably a cleaner way to do it.

code-gijoe
  • 6,949
  • 14
  • 67
  • 103