0

I was inspecting the elements on firefox and chrome I realised that the a element is longer than the image inside it. The image is 102px and the a is 106.4px. I'm wondering where do the extra 4.4 pixels come from?

The original image is 102px by 102px.

Image Size Screenshot

a tag Size Screenshot

here's my code (also on jsfiddle https://jsfiddle.net/g5nsL52a/ ):

header {
 min-height:102px;
 text-align:center;
 font-family: "Felix Titling Regular", Times, serif;
}
header a {
 display:inline-block;
 position:absolute;
 left:0;
}

header h1 {
 display:inline-block;
 position:relative;
 top:29px;
 font-size:300%;
 text-transform:capitalize;
}
<header>
  <a href="index.html">
    <img src="https://images.pexels.com/photos/430205/pexels-photo-430205.jpeg" width="102" height="102" alt="Godfather Logo" title="Godfather Small Logo"/>
  </a>
  <h1> loyal capos to the don </h1>
</header>
René
  • 6,006
  • 3
  • 22
  • 40

1 Answers1

0
header a{
    display:inline-block;
    position:absolute;
    left:0;
    height:102px;
    width:102px;
    padding:0;
    margin:0;
}
Donald Duck
  • 8,409
  • 22
  • 75
  • 99
kadir
  • 64
  • 4