Home Forums Backend Issues (wp-admin) Field spacing off after setting width


Field spacing off after setting width

  • I noticed after setting the width to 50% on two fields that the next field (which the width was not changed) is not getting the correct margin applied. I attached an image of the issue.

    As a secondary item I noticed that the next field after you have set a width, when that item also has a custom width (but on the next line) it gets a margin applied to the left on the next line. Attached an image for this also.

  • Hi @avelient

    The first issue occurs because fields with width property have a float style that ignores the top margin of the next un-floated field.

    The second issue occurs because fields with width property have a left margin style except the first one. This style will provide gaps between the fields.

    To fix both issues, you need to add a class to the fields that have the issue and then add a custom CSS code using acf/input/admin_head like this:

    function my_acf_admin_head() {
    	<style type="text/css">
    		/* ... */
    add_action('acf/input/admin_head', 'my_acf_admin_head');

    I hope this helps.

  • I know I can fix this issue with some CSS tweaks pretty easily.

    Was curious if this was going to be an fixed in the next update of the product or if I have to work out my own issues for this particular issue. Just figuring out the timeline for the updates if they will be included.

    Thanks for the quick reply.

  • Hi @avelient

    I believe the style is designed to work perfectly with the standard layout. If you need to change the layout, you mostly need to modify the CSS too. I’m sorry for the inconvenience.

    If you think this issue should be fixed in the future updates, please open a new ticket here:


Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Field spacing off after setting width’ is closed to new replies.