#outerholder {
    max-width: 600px;
}


#frontpic, #backpic  {
    position: absolute;
    width: 100%;
    height: auto;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
    perspective: 2000px;
    transition: transform 0.5s ease-in;
    transform-origin: 100% 100% 0px;
}

#imgholder {
    perspective: 2000px;
}

#imgholder img {
    position: absolute;
    width: auto;
    max-width: 100%;
    max-height: 100%;
    margin: auto;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
}


.unflipped {
    transform: rotateX(0deg);
}

.flipped {
    transform: rotateX(98deg) translateY(0);
}


