Title: Problem with html markup!!
Last modified: August 19, 2016

---

# Problem with html markup!!

 *  Resolved [ElSebas](https://wordpress.org/support/users/elsebas/)
 * (@elsebas)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/problem-with-html-markup/)
 * Well i got a problem with my blog, this is my index html:
 *     ```
       <div id="container">
       <div id="header">
       </div><!--header-->
       <div id="main">
       </div><!--main-->
       <div id="aside">
       </div><!--aside-->
       </div><!--container>
       ```
   
 * But when I try to see older posts my markup change to :
 *     ```
       <div id="container">
       <div id="header">
       </div><!--header-->
       <div id="main">
       </div><!--main-->
       </div><!--container>
       <div id="aside">
       </div><!--aside-->
       ```
   
 * The aside div gets out of the container. I dont know what could be the problem
   because everything else is fine, is only when I try to see older posts so Any
   ideas??

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [randinicole](https://wordpress.org/support/users/randinicole/)
 * (@randinicole)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/problem-with-html-markup/#post-1830531)
 * care to link me to the site in question ??
 * Make sure your html is validated and that the html format is the same on index.
   php and page.php if you are using the pages template.
 * Aside from viewing the site and mark up myself all I can do is take stabs in 
   the semi-dark.
 *  Thread Starter [ElSebas](https://wordpress.org/support/users/elsebas/)
 * (@elsebas)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/problem-with-html-markup/#post-1830614)
 * I dont upload the site yet, but here is the full code:
    Index:
 *     ```
       <?php get_header(); ?>
       	<?php if(is_home() && !is_paged()): ?>
       		<?php include (TEMPLATEPATH .'/featured.php'); ?>
       	<?php endif; ?>
       		<div id="wrap_minipost">
       			<?php
       				$limit = get_option('post_per_page');
       				query_posts('showposts='.$limit.'&paged='.$paged.'&cat=-7'); ?>
       				<?php if(have_posts()) :?>
       					<?php while(have_posts()) : the_post(); ?>
       					<!--haz lo que tengas q hacer aqui-->
       					<div id="pst">
       						<div class="img_minipost">
       							<img src="<?php echo get_post_meta($post->ID, 'thumbnail', true)  ?>" alt="Post Image" class="postimg" />
       							<section class="border"></section>
       							<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
       							<div class="fecha">
       								<span class="dia"><?php the_time('j') ?></span>
       								<span class="mes"><?php the_time('M') ?></span>
       							</div><!--Termina fecha-->
       						</div><!--Termina img_minipost-->
       						<?php the_content(''); ?><!--El Contenido-->
       						<p><a href="<?php the_permalink(); ?>" rel="leer">Leer mas</a></p>
       					</div><!--Se cierra pst-->
       					<!--haz lo que tengas q hacer aqui-->
       					<?php endwhile; ?>
       				<?php else: ?>
       						<h2>No hay nada</h2>
       						<p>Lo siento, pero lo que buscas no esta aqui</p>
       						<p><a href="<?php echo get_option('home'); ?>">Regresar al inicio</a></p>
       				<?php endif; ?>
       			<div id="pagination">
       				<ul>
       					<li class="anteriores"><?php next_posts_link('Articulos anteriores') ?></li>
       					<li class="nuevos"><?php previous_posts_link('Articulos nuevos') ?></li>
       				</ul>
       			</div><!--Termina pagination-->
       		</div><!--Termina wrap_minipost-->
       	</div><!--Termina main-->
       	<?php get_sidebar(); ?>
       	<div id="footer">
       	</div><!--Termina footer-->
   
       <?php get_footer(); ?>
       ```
   
 * Featured:
 *     ```
       <div id="main">
       		<div id="wrap_featured">
       			<?php $my_query = new WP_Query('category_name=Featured&showposts=2');
       			while ($my_query->have_posts()) : $my_query->the_post();
       			$do_not_duplicate = $post->ID; ?>
       				<div id="featured_post">
       					<img src="<?php echo get_post_meta($post->ID, 'imagen_principal', true)  ?>" alt="Post Image" class="postimg" />
       					<div id="info_post">
       						<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
       						<?php the_content(''); ?>
       					</div><!--Termina info_post-->
       				</div><!--Termina featured_post-->
       				<?php endwhile; ?>
       		</div><!--Termina wrap_featured-->
       ```
   
 * Page:
 *     ```
       <?php get_header(); ?>
       	<?php if(is_home() && !is_paged()): ?>
       		<?php include (TEMPLATEPATH .'/featured.php'); ?>
       	<?php endif; ?>
       	<div id="main">
       		<div id="wrap_minipost">
       			<?php
       				$limit = get_option('post_per_page');
       				query_posts('showposts='.$limit.'&paged='.$paged.'&cat=-7'); ?>
       				<?php if(have_posts()) :?>
       					<?php while(have_posts()) : the_post(); ?>
       					<!--haz lo que tengas q hacer aqui-->
       					<div id="pst">
       						<div class="img_minipost">
       							<img src="<?php echo get_post_meta($post->ID, 'thumbnail', true)  ?>" alt="Post Image" class="postimg" />
       							<section class="border"></section>
       							<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
       							<div class="fecha">
       								<span class="dia"><?php the_time('j') ?></span>
       								<span class="mes"><?php the_time('M') ?></span>
       							</div><!--Termina fecha-->
       						</div><!--Termina img_minipost-->
       						<?php the_content(''); ?><!--El Contenido-->
       						<p><a href="<?php the_permalink(); ?>" rel="leer">Leer mas</a></p>
       					</div><!--Se cierra pst-->
       					<!--haz lo que tengas q hacer aqui-->
       					<?php endwhile; ?>
       				<?php else: ?>
       						<h2>No hay nada</h2>
       						<p>Lo siento, pero lo que buscas no esta aqui</p>
       						<p><a href="<?php echo get_option('home'); ?>">Regresar al inicio</a></p>
       				<?php endif; ?>
       			<div id="pagination">
       				<ul>
       					<li class="anteriores"><?php next_posts_link('Articulos anteriores') ?></li>
       					<li class="nuevos"><?php previous_posts_link('Articulos nuevos') ?></li>
       				</ul>
       			</div><!--Termina pagination-->
       		</div><!--Termina wrap_minipost-->
       	</div><!--Termina main-->
       	<?php get_sidebar(); ?>
       	<div id="footer">
       	</div><!--Termina footer-->
   
       <?php get_footer(); ?>
       ```
   
 *  Thread Starter [ElSebas](https://wordpress.org/support/users/elsebas/)
 * (@elsebas)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/problem-with-html-markup/#post-1830616)
 * Ok problem solved, just need it to change the div main outside the featured haha
   I can’t believe that I missed that. Anyways thank you randinicole 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Problem with html markup!!’ is closed to new replies.

## Tags

 * [html](https://wordpress.org/support/topic-tag/html/)
 * [markup](https://wordpress.org/support/topic-tag/markup/)
 * [templates](https://wordpress.org/support/topic-tag/templates/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [ElSebas](https://wordpress.org/support/users/elsebas/)
 * Last activity: [15 years, 5 months ago](https://wordpress.org/support/topic/problem-with-html-markup/#post-1830616)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
