• I’ve used the following code to add drop down menus for a client site:

    <select name="archive-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;">
      <option value=""><?php echo esc_attr( __( 'Select Month' ) ); ?></option>
      <?php wp_get_archives( array( 'type' => 'monthly', 'format' => 'option', 'show_post_count' => 1 ) ); ?>
    </select>

    <?php wp_dropdown_categories( $args ); ?>

    I’d love to style the drop downs – something like this: http://tympanus.net/Tutorials/CustomDropDownListStyling/ but can’t quite figure out how to make it work with the php. I tried wrapping the php codes in classes and div ids without much luck. Any ideas? When I search on styling drop downs, I seem to turn up a lot of tutorials about WordPress menus. It seems drop downs for categories and archives are a bit ‘behind the times’ but this client wants them, and I’d at least like to make them look nice for her.

The topic ‘Styling php drop downs with CSS?’ is closed to new replies.