Home › Forums › Add-ons › Flexible Content Field › Fexible know content › Reply To: Fexible know content
I would use CSS for this. You should read about adjacent sibling selectors.
If your HTML is this:
<div class="image-block">
<!-- img here -->
</div>
<div class="text-block">
text here
</div>
You can target .text-block that is immediately after .image-block with this CSS:
.image-block + .text-block {
/* CSS here */
}
You could then either collapse top margin or padding in that scenario or add whatever else you need depending on your CSS.
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.