Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
[SOLVED] clear div after every 2 divs
This should be simple but I’m still head-scratching. At the moment, I am using the following code
<txp:images category="cite" limit="999" sort="alt desc" break="">
<div class="grid_12 grideven"><figure itemscope itemtype="http://schema.org/ImageObject">
<span itemprop="image" class="grid_7 alpha"><img src="<txp:site_url />images/<txp:image_info type="id" />t<txp:image_info type="ext" />" alt="<txp:image_info type="alt" />" title="<txp:image_info type="alt" />" width="<txp:image_info type="thumb_w" />" height="<txp:image_info type="thumb_h" />" /></span>
<figcaption itemprop="caption" class="grid_17 omega"><txp:image_info type="caption" escape="" />
</figcaption></figure>
<div class="clear"> </div>
</div>
</txp:images>
Is there a way to have a <div class="clear"> </div>
after every second div parsed?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: [SOLVED] clear div after every 2 divs
Hi,
there was a plugin from zem : zem_nth, if you couldnt find it i can past it here.
Cheers.
Offline
Re: [SOLVED] clear div after every 2 divs
Have you tried
<txp:images breakby="2" break="<div class='clear'> </div>" ... />
combination?
Offline
Re: [SOLVED] clear div after every 2 divs
Gocom’s fork of zen_nth
See also: txp:article_custom odd and even for a plugin-free solution using if_variable from etc
Offline
Re: [SOLVED] clear div after every 2 divs
etc wrote #318164:
Have you tried
<txp:images breakby="2" break="<div class='clear'> </div>" ... />...
combination?
That was exactly what I was trying to figure out but managed to fall into the old single/double quotes trap which was breaking the layout. Thanks so much Oleg.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Pages: 1