php - Featured Image Issues -


the featured image isn't shown container width , height. how display featured image:

<div id="featuredimage"><?php the_post_thumbnail();?></div> 

this css featuredimage

#featuredimage {   height:200px;   background-color:#000;   margin-left: -40px;   margin-right: -40px;   margin-top: -20px; }  .featuredimage img {   height:200px;   width:600px; } 

this code in php functions

<?php add_theme_support( 'post-thumbnails' ); ?> 

what's wrong? can see final result here. may notice, featured image adopts size 1 want be.

did try using id instead of class, e.g.

#featuredimage img {   height:200px;   width:600px; } 

however, repeating use of id i.e.

<div id="featuredimage"> 

is used multiple times on page. id's should unique (see http://www.w3.org/tr/wcag20-techs/h93.html) therefore consider changing id class;

.featuredimage {   height:200px;   background-color:#000;   margin-left: -40px;   margin-right: -40px;   margin-top: -20px; }  .featuredimage img {   height:200px;   width:600px; }  <div class="featuredimage">...</div> 

Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -