How to fix responsive image bug in wordpress?
-
I’m trying to make a responsive theme on wordpress. When i’m on a desktop resolution, the thumbnails are 100% adjusted to the card, but when i reduce the resolution to a mobile device, it gets bigger than the card. Why is it happening?
I have already tried to add the bootstrap 4 responsive image class.
<section id="blog" class="blog d-flex align-items-center mt-5 mb-5"> <?php query_posts('posts_per_page=3'); ?> <div class="container"> <div class="d-flex align-items-center"> <h1>úLTIMAS<BR>PUBLICA??ES</h1> </div> <div class="row"> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div class="col-sm-7 col-md-4 mt-3"> <a href="<?php the_permalink() ?>"><img src="<?php the_post_thumbnail_url('thumbnail'); ?>" class="rounded-top"></a> <div class="card-body border rounded-bottom"> <h4 class="card-title border-bottom pb-3 "><a href="<?php the_permalink() ?>"><?php the_title() ?></a></h4> <p class="card-text"><?php the_subtitle(); ?></p> <a href="<?php the_permalink() ?>" class="btn btn-outline-dark btn-sm">Continuar lendo</a> </div> </div> <?php endwhile; ?> <?php endif; ?> </div> </section>
expeted:
reality:
The thumbnail size configured on wordpress admin panel is 350 x273px
The page I need help with: [log in to see the link]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘How to fix responsive image bug in wordpress?’ is closed to new replies.