WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Verve Meta Boxes] Text input fields wider? (2 posts)

  1. tzeldin88
    Member
    Posted 3 years ago #

    In a verve meta box, on the Edit screen, the text input fields are very narrow (only about 130px wide). How can I make them wider? I tried this CSS but it did not work.

    .verve_meta_box_content p input {
    	width: 300px;
    }
  2. tzeldin88
    Member
    Posted 3 years ago #

    Finally answered my own question:
    I was putting the above css into my theme's stylesheet, which of course would not be applied in wp-admin. So I needed to create a custom wp-admin stylesheet, and use a hook to apply it to the wp-admin.

    in theme's functions.php

    function my_custom_admin() {
        $css_url = get_bloginfo('stylesheet_directory') . '/my-wp-admin.css';
        ?>
        <link rel="stylesheet" href="<?php echo $css_url;?>">
        <?php
    }
    add_action('admin_head', 'my_custom_admin');

    in themes/my-theme/my-wp-admin.css

    /* Verve Meta Boxes
    -------------------------------------------------------------- */
    .verve_meta_box_content input[type="text"] {
    	width: 300px;
    }
    .verve_meta_box_content input.date-pick {
    	width: auto;
    }

Topic Closed

This topic has been closed to new replies.

About this Topic