 <p>See This <a href="http://jsfiddle.net/evhxrrjh/" rel="nofollow">Demo</a></p> <pre><code>.Img{border: 2px solid grey;} .Img a:hover{ outline: 2px solid black;} </code></pre> <p>Note: Class Name can not start with integer.</p> <p>Refer <a href="http://stackoverflow.com/questions/448981/what-characters-are-valid-in-css-class-selectors">This</a> for Rules regarding naming.</p>