Skip to content

Instantly share code, notes, and snippets.

@peterflynn
Last active August 29, 2015 14:11
Show Gist options
  • Select an option

  • Save peterflynn/6612dca2dcd163648991 to your computer and use it in GitHub Desktop.

Select an option

Save peterflynn/6612dca2dcd163648991 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="main.css">
</head>
<body>
<div class="pane-content" style="height: 500px">
<div class="image-view" style="top: 0px; left: 0px; width: 1690px; height: 500px;">
<div class="image-centering">
<div class="image">
<img class="image-preview" src="screenshots/quick-edit.png">
</div>
</div>
</div>
</div>
</body>
</html>
body { /* stands in for #first-pane */
display: block;
overflow: hidden;
margin: 0;
width: 100%;
height: 100%;
}
.pane-content {
display: block;
margin: 0;
overflow: hidden;
height: 100%;
width: 100%;
}
.image-view {
overflow: hidden;
position: absolute;
top: 0px;
right: 0px;
bottom: 0px;
left: 0px;
}
.image-centering {
display: inline-block;
max-width: 90%;
max-height: 90%;
}
.image {
position: relative;
}
.image-preview { /* actual <img> tag */
max-width: 100%;
max-height: 90%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment