Home › Forums › Backend Issues (wp-admin) › Field spacing off after setting width › Reply To: Field spacing off after setting width
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">
/* ... */
</style>
<?php
}
add_action('acf/input/admin_head', 'my_acf_admin_head');
?>
I hope this helps.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.