: relative;

    margin: 20px auto;
    width: 200px;
    height: 100px;
    border: 10px solid black;
    overflow: hidden;
  }

  img {
    /*
    Center the image vertically by positioning
    its `top` 50% of the height of the parent,
    which pushes it down, then adjust it upwards
    -50% its own height with `translateY`.
    */
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    display: block;
    width: 100%;
    height: auto;
  }

  </style>
</head>
<body>

  <h1>
    Cent