With the static html/css title that i have inside h1, is displaying over image, but when i use the_post_thumbnail();
with the_title();
. Title moves above the image
What may be the issue?
<div class="col-sm-6 col-md-4 padding-fixation">
<?php $portfolio_home = new WP_Query('cat=1'); ?>
<?php while($portfolio_home->have_posts()) : $portfolio_home->the_post(); ?>
<div class="image-portfolio" data-section="office">
<div class="img-block">
<img class="img-responsive" src="<?php the_post_thumbnail(); ?>" alt="">
</div>
<div class="overlay-header">
<h1><?php the_title(); ?></h1>
</div>
<div class="text-overlay">
<p><?php the_content(); ?></p>
</div>
</div>
<?php endwhile; ?>
</div>