Title: Change dropdown width
Last modified: August 20, 2016

---

# Change dropdown width

 *  [Kocoyoko](https://wordpress.org/support/users/kocoyoko/)
 * (@kocoyoko)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/change-dropdown-width/)
 * How can I change the dropdown width?
    Thank you!

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Thread Starter [Kocoyoko](https://wordpress.org/support/users/kocoyoko/)
 * (@kocoyoko)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/change-dropdown-width/#post-2133567)
 * Anyone?
 *  Thread Starter [Kocoyoko](https://wordpress.org/support/users/kocoyoko/)
 * (@kocoyoko)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/change-dropdown-width/#post-2133593)
 * Bump
 *  [wizardstudios](https://wordpress.org/support/users/wizardstudios/)
 * (@wizardstudios)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/change-dropdown-width/#post-2133594)
 * Which dropdown do you mean?
 *  Thread Starter [Kocoyoko](https://wordpress.org/support/users/kocoyoko/)
 * (@kocoyoko)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/change-dropdown-width/#post-2133595)
 * The name in the form is “select”, here is what I mean:
    [http://coacmalaga.es/wp-content/uploads/2011/07/dropdown.jpg](http://coacmalaga.es/wp-content/uploads/2011/07/dropdown.jpg)
 *  [wizardstudios](https://wordpress.org/support/users/wizardstudios/)
 * (@wizardstudios)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/change-dropdown-width/#post-2133596)
 * Ah, i understand. you are doing a backend interface for your plugin?
 * [http://wpengineer.com/wp-content/uploads/screenshot-2.png](http://wpengineer.com/wp-content/uploads/screenshot-2.png)
   
   Here you find a list of all needed elemets including their style classes. For
   your exact question: You can give your select your own class and define the width
   by CSS.
 * For Example: `<select class="my-select-class">`
 * Then you have to define your own stylesheet CSS file for this.
    Here is the way
   you can attach the stylesheet to the admin area:
 *     ```
       function admin_register_my_styles() {
           $siteurl = get_option('siteurl');
           $url = $siteurl . '/wp-content/plugins/' . basename(dirname(__FILE__)) . '/yourstyle.css';
           wp_register_style( 'your-plugin-slug', $url );
           wp_enqueue_style( 'your plugin-slug' );
       }
       add_action('admin_print_styles-[YOUR OPTIONS PAGE SLUG]', 'admin_register_my_styles');
       ```
   
 * I hope that helped?
 *  Thread Starter [Kocoyoko](https://wordpress.org/support/users/kocoyoko/)
 * (@kocoyoko)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/change-dropdown-width/#post-2133597)
 * Oooops, sorry, I should have said I referred to the plugin Contact Form 7…
 * Thank you anyway for your help, I will post again correctly.
 *  [wizardstudios](https://wordpress.org/support/users/wizardstudios/)
 * (@wizardstudios)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/change-dropdown-width/#post-2133598)
 * No Problem 🙂
 * The form fields from contact form 7 work the same way. you can give them classes
   like you want. For Example: `[select choosesome class:my-class]`
 * Then you can define the width via CSS in your themes style.css file.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Change dropdown width’ is closed to new replies.

## Tags

 * [dropdown](https://wordpress.org/support/topic-tag/dropdown/)
 * [size](https://wordpress.org/support/topic-tag/size/)

 * 7 replies
 * 2 participants
 * Last reply from: [wizardstudios](https://wordpress.org/support/users/wizardstudios/)
 * Last activity: [14 years, 9 months ago](https://wordpress.org/support/topic/change-dropdown-width/#post-2133598)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
