Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
break every 2 div(s)
I have a display problem with floating divs.
What I would like is for the divs which are different heights to appear in pairs. Currently the divs appear messy as the divs get stuck under the second ‘column’. Is there a css or txp way to add a clear:both
every two grid_12
divs?
My code currently is
<txp:images category="cite" limit="999" sort="alt desc">
<div class="grid_12">
<txp:thumbnail class="grid_3 alpha" />
<div class="grid_9 omega"><txp:image_info type="caption" escape="" /></div>
</div>
</txp:images>
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: break every 2 div(s)
I’ve used this plugin in the past zem_nth for exactly the same problem
Or even something like this in jquery (not tested ) $('.grid_12>div:even').css("clear", "both");
Offline
Re: break every 2 div(s)
Hi Tye, I found that the solution was easier. All I needed to do was to add height:250px;min-height:250px;
in the css.
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: break every 2 div(s)
You can probably use CSS nth-of-type to achieve that too.
Offline
Re: break every 2 div(s)
Hi Phil, I considered that too but as ie does not support it without javascript i used this little css.
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