vertical align

In this example below you will see how to do a vertical align with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by rafaelferreira, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright rafaelferreira ©
  • HTML
  • CSS
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>vertical align</title>
  
  
  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  
<div id="try">
   <img src="https://cdn4.buysellads.net/uu/1/3332/1524775668-62091.png" alt="">
</div>
  
  

</body>

</html>

/*Downloaded from https://www.codeseek.co/rafaelferreira/vertical-align-mLjWBR */
img{
  margin: 0 auto;
  display: block;
}

Comments