title: Recent Posts messy wordpress
body: <p>I have a little problem with recent posts in a template what I'm developing</p>
  
  <p><a href="https://i.stack.imgur.com/iZRlE.png" rel="nofollow noreferrer">Screenshot</a></p>
  
  <p>This is the original HTML code</p>
  
  <pre><code>&lt;div class="main-news"&gt; &lt;!-- general post container --&gt;
  
          &lt;div class="new"&gt;
              &lt;div class="new-content"&gt;
                  &lt;div class="new-image"&gt;
                      &lt;img class="noselect" src="&lt;?php bloginfo('template_directory');?&gt;/images/new-03.jpg" alt="News" title="Llamado Al templo"&gt;
                  &lt;/div&gt;
                  &lt;div class="new-content-excerpt"&gt;
                      &lt;h1&gt;Llamado al Templo&lt;/h1&gt;
                      &lt;p&gt;La Academia Jedi Chile llama a todos sus miembros a reunirse en el templo jedi para iniciar un periodo de entrenamiento y... &lt;/p&gt;
                      &lt;p class="entrada"&gt;Entrada por: Midtaurus | 15/03/2016 | &lt;span class="mark"&gt;Comentarios(8)&lt;/span&gt;&lt;/p&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
      &lt;/div&gt;
  </code></pre>
  
  <p>And this is the wordpress adaptation</p>
  
  <pre><code>&lt;?php
      $recent_posts_query = new WP_Query(array('post_type' =&gt; 'post', 'posts_per_page' =&gt; 3));
  
      while ($recent_posts_query-&gt;have_posts())
      {
      $recent_posts_query-&gt;the_post();
      ?&gt;
  &lt;div class="main-news"&gt;
      &lt;div class="new"&gt;
          &lt;div class="new-content"&gt;
          &lt;div class="new-image"&gt;
          &lt;?php the_post_thumbnail();?&gt;
      &lt;/div&gt;
      &lt;div class="new-content-excerpt"&gt;
      &lt;h1&gt;&lt;?php echo the_title(); ?&gt;&lt;/h1&gt;
  &lt;?php the_excerpt();?&gt;
      &lt;p class="entrada"&gt;Entrada por: &lt;?php the_author(); ?&gt; | &lt;?php echo the_date('d/m/y'); ?&gt; | &lt;span class="mark"&gt;Comentario/s&lt;/span&gt;&lt;/p&gt;
  &lt;/div&gt;
  
      &lt;?php
      }
      ?&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I'm kinda lost, I can't find what is the issue, tried different codes, but all do the same</p>
  
  <p>Thanks for your time and have a nice new year :)</p>
  
  <p>PS: In the HTML version when I duplicate the posts they don't mess up</p>