I need your expertise, I'm a confused about this kind of approach.
What I'm trying to do are if the span3 is equals to 3 items it will wrap it inside the item and row div and the first item div will have a active class on it.
What im trying to accomplish
<div class="item active">
<div class="row-fluid">
<div class="span3">
<a href="#x" class="thumbnail"><img src="http://placehold.it/250x250" alt="Image" style="max-width: 100%;" /></a>
</div>
<div class="span3">
<a href="#x" class="thumbnail"><img src="http://placehold.it/250x250" alt="Image" style="max-width: 100%;" /></a>
</div>
<div class="span3">
<a href="#x" class="thumbnail"><img src="http://placehold.it/250x250" alt="Image" style="max-width: 100%;" /></a>
</div>
</div>
<!--/row-fluid-->
</div>
My Current Wordpress Query Post Code
<?php
$args = array(
'post_type' => 'post',
'posts_per_page' => -1,
);
query_posts($args);
$x = 0;
while (have_posts()) : the_post(); ?>
<div class="item active">
<div class="row-fluid">
<div class="span3">
<a href="#x" class="thumbnail"><img src="http://placehold.it/250x250" alt="Image" style="max-width: 100%;" /></a>
</div>
</div>
</div>
<?php if ($x == 3) { echo '</div></div><div class="item"><div class="row-fluid">'; $x = -1; } $x++; ?>
<?php endwhile; ?>