Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
<figure>
<a href=""><img width=100 height=100 src="http://lorempixel.com/100/100/" ></a></body>
    <figcaption>A figure with an image in a link, and some ugly underlined gaps.</figcaption>
    </figure>
    
</html>
 
/*Issue*/
a {
    text-decoration: none;
    border-bottom: 1px solid #707070;
    padding: 0 1px;
    margin: 0 -1px;
}
img {
    display: block;
}
/* making the issue more visible */
a {     background: rgba(255,0,0,0.2); }
a:hover {   background: red; }
/* context to simulate a bit what we have in the stylesheets*/
figure { text-align: center; }
img {   margin: 1em auto; }
/* uncomment to see proposed fix
figure > a {
  padding: 0;
  margin: 0;
}
*/
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
frivoalpro
0viewers