Return to Snippet

Revision: 40786
at February 8, 2011 02:25 by gabrielsmith


Initial Code
<style>
.logo {
  display: block;
  text-align: center;
  display: block;
  text-align: center;
  vertical-align: middle;
  border: 4px solid #dddddd;
  padding: 4px;
  height: 74px;
  width: 74px; }
  .logo * {
    display: inline-block;
    height: 100%;
    vertical-align: middle; }
    .logo .photo {
    height: auto;
    width: auto;
    max-width: 100%;
    max-height: 100%;
}
</style>
<figure class='logo'>
    <span></span>
    <img class='photo'/>
</figure

Initial URL

                                

Initial Description

                                

Initial Title
Vertically and Horizontally Centered Images in CSS

Initial Tags

                                

Initial Language
HTML