Home › Forums › Bug Reports › Featured Image in Relationship Field is messy
Hi,
I’ve set up a relationship field which has quite a visual selection process, so I thought checking the box “Featured Image” next to Elements would be great. However, if there are multiple listings or search results that are displayed the formatting of the featured image is really messy:
See attached
I’m not sure if you guys are aware of this. Are there any settings I can apply that will make this function a bit better? Perhaps a list of thumbnails instead of a row after row list would be a better option if the Featured Image option is selected?
Thanks for the screenshot. It looks like the CSS rules are not being applied to the image.
Normally these would be set to 21px
.
Perhaps you could use the inspector to view what CSS is overriding this?
Thanks
E
Hi Elliot,
When I inspect the element there are no styles active on the image, when I manually add a width:21px the image displays OK.
I don’t have many plugins installed on this project, only Advanced Custom Fields, A custom post type plugin I created, which just registers a post type and taxonomy, WordPress Importer, WordPress MU Domain Mapping and WP Migrate DB Pro. None of these should interfere with your ACF styling, right?
Actually I think I know the issue, the width set in this style: .acf_relationship .relationship_list .result-thumbnail is only applying to the div, not the img tag inside of it. See attached screenshot.
Cheers
Thanks for the info. On my instal, WP will add a width / height attribute to the image (see image attached).
I don’t know why your img tab does not have these attributes, but I’m happy to add in the CSS on the img tag, easy.
Thanks
E
Maybe that is best. So will that be included in the next update?
Yes, this has been added to the next version.
Cheers
E
The topic ‘Featured Image in Relationship Field is messy’ is closed to new replies.
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.