Quantcast
Channel: responsive – WordPress.org Forums
Viewing all articles
Browse latest Browse all 16569

Patrick Tracy on "Feat Image as Post banner percentage resize"

$
0
0

I am trying to use the Featured image as a cover for their respective single post pages. I can reference and get the image but when I try to change the width and height responsive (ex max-width: 100%; height: auto;) It won't take. Maybe because it is not a div or a class. Here is my code that I am looking to make responsive.

<?php
if ( has_post_thumbnail() ) { ?>
	<a href="<?php the_permalink() ?>"><img class="scale-with-grid" src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php get_image_url(); ?>&h=350&w=1200&zc=1" alt=""/></a>
<?php } else { ?>
	<a href="<?php the_permalink() ?>"><img class="scale-with-grid" src="<?php bloginfo('template_directory'); ?>/images/dummy.jpg" alt="" /></a>
<?php } ?>

Here is one of my posts on my site:

Studio92creative.com

I'd like it to function like this sites cover:

abduzeedo.com

Any help would be greatly appreciated!


Viewing all articles
Browse latest Browse all 16569

Latest Images

Trending Articles



Latest Images