I tried to add elements to metaboxes and I am having a problem with the height.

Here is an example of "good" scenario of adding a textbox and a checkbox - the height is coordinates automatically to accommodate the contained element:

  'Tabs', 'tabs_meta_box',
  $options_page, 'normal', 'core' ); 
function tabs_meta_box( $options ) { ?>
    Tabs: <input type="text" name="ga_account_name_3" value="<?php echo esc_html(   $options['ga_account_name_3'] ); ?>"/><br />
    Eliminate Additional Information <input type="checkbox" name="eliminate_aditional_information" <?php if ( $options['eliminate_aditional_information'] ) echo ' checked="checked" '; ?>/><br />
<?php }

On the other hand If the markup is like the following than its being clipped in the middle of the box

<ul id="sortable1" class="connectedSortable">
    <li  id = "id_1"> 1 On Sale Indication</li>
    <li  id = "id_2"> 2 Product Feature Image</li>
    <li  id = "id_3"> 3 Product Title</li>
    <li  id = "id_4"> 4 Product Rating</li>
    <li  id = "id_5"> 5 Product Price</li>
    <li  id = "id_6"> 6 Short Description(excerpt)</li>
    <li  id = "id_7"> 7 Add to Cart Button</li> 
  • To understand your code better, where is this meta box being displayed? May you update your question with the full code for your meta box? This will help me give you a better solution. – Ethan Jinks O'Sullivan Aug 31 '16 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.