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:
I'd like it to function like this sites cover:
Any help would be greatly appreciated!