Here is the issue at hand:
`http://jsfiddle.net/5gju85un/3/`
I am trying to prevent div #3 from moving higher while keeping it floated left. Any suggestions on how I can achieve this?
UPDATE
The divs are generated dynamically in my original code through a loop, so creating two parent divs is not an option.
UPDATE
Below is the entire code snippet (I am creating a custom template for use in WordPress)
HTML/PHP
if ( $loop->have_posts() ) {
while ( $loop->have_posts() ) : $loop->the_post()?>
<div class="produkt ramka">
<div class="produkt_obraz">
<?php woocommerce_show_product_images();?>
</div>
<div class="produkt_nazwa">
<h3 class="produkt_litery"><?php woocommerce_template_single_title();?></h3>
</div>
<div class="produkt_cena">
<?php woocommerce_template_single_price();?>
</div>
<div class="produkt_line">
</div>
<div class="produkt_opis">
<?php the_content();?>
</div>
<div class="produkt_koszyk">
<?php woocommerce_template_loop_add_to_cart()?>
</div>
</div>
<?php endwhile;
}
CSS
.produkt
{
display: inline-block;
height:auto;
min-height:120px;
width:49.50%;
margin-bottom:5px;
background-color:#252525;
overflow:hidden;
}
.produkt:nth-child(2n+1)
{
float:left;
}
.produkt:nth-child(2n)
{
float:right;
}
The code in the provided jsfiddle is based on the CSS shown above