filter with border/padding
Tests the effects of a filter on an elements border and padding.
by Timmy Willison
HTML
<a href="#">
<img src="http://jsfiddle.net/img/logo.png">
</a>
<button>fadeOut</button>
CSS
a {
background: blue;
position: relative;
margin-top: -10px;
display: block;
width: 200px;
}
a img {
border: 2px solid black;
padding: 10px;
margin-top: -5px;
/* display: block; */ /* Uncomment/comment this style */
}
JavaScript
$('button').click(function() {
$('a').fadeOut(2000);
});