Forum
Extra blank space being added around repeaters
Hi, I'm having an issue with repeaters automatically breaking onto new lines. Because I'm having to use display-inline in my CSS, this is causing list items to stack under each other rather than inline.
My template looks like this:
<perch:repeater id="features" label="Features" max="6">
<perch:before>
<div class="features-list">
<div class="col1 no-padding">
<ul></perch:before><li><perch:content id="features-text" /></li><perch:after></ul>
</div>
<div class="clear"></div>
</div>
</perch:after>
</perch:repeater>
As you can see, there is no space between any of the tags, but the HTML being out-put is this:
<div class="features-list">
<div class="col1 no-padding">
<ul><li>Feature One</li>
<li>Feature Two</li>
<li>Feature Three</li>
<li>Feature Four</li></ul>
</div>
<div class="clear"></div>
</div>
The problem seems specific to repeaters.
What type of field is
features-text
? It's missing atype
attribute.Also, try:
Thanks Drew,
That's fixed it.
Adding the type="" before trying your new html didn't any difference though. The content is being pulled in using content_custom and type is set in the main region. Is it best practice to set type in all instances?
It's required to set type in all instances.
https://docs.grabaperch.com/docs/templates/tag-structure/