Forum Moderators: not2easy
<div class=content>
<div class="thumb previous">
<a href="/galleries/test/5.html" >
<img title=Previous src="/galleries/test/thumbs/5.jpg" />
</a>
</div>
<div class=full>
<a href="/galleries/test/files/6.png">
<img src="/galleries/test/files/6.png" title="Click to View Full Size" />
</a>
</div>
<div class="thumb next">
<a href="/galleries/test/7.html" >
<img title=Next src="/galleries/test/thumbs/7.jpg" />
</a>
</div>
</div>
* {
margin: 0;
padding: 0;
box-sizing:border-box;
}
html {
background:#111;
height:100%;
width:100%;
}
body {
height:100%;
width:100%;
position:relative;
}
.fullpage .content {
height:100%;
width:100%;
display:flex;
align-items: center;
}
.fullpage .thumb {
flex: 0 0 10%;
}
.fullpage .full {
flex: 1 1 80%;
}
img {
display: block;
}
.fullpage .thumb img {
width:100%;
}
.fullpage img {
max-height:100%;
max-width:100%;
margin: 0 auto;
}
.fullpage .full a {
display: inline-block;
line-height:0;
width:100%;
height:100%;
} [edited by: not2easy at 2:55 pm (utc) on Apr 14, 2018]
[edit reason] See Charter/ToS [/edit]
* {
margin: 0;
padding: 0;
box-sizing:border-box;
}
html {
background:#111;
height:100%;
width:100%;
}
body {
height:100%;
width:100%;
position:relative;
}
.content {
height:100%;
width:100%;
display:flex;
align-items: center;
}
.thumb {
flex: 0 0 10%;
}
img {
display: block;
}
.thumb img {
width:100%;
}
.full {
flex: 1 1 80%;
display:flex;
align-items: center;
width:100%;
height:100%;
padding:1rem;
}
.full img {
object-fit:contain;
max-width:100%;
max-height:100%;
margin: 0 auto;
}
<!DOCTYPE html>
<html lang=en>
<head>
<meta charset=utf-8>
<link rel=icon type="image/x-icon" href="/assets/NotePaper2_Themes/chipdt4.ico">
<title>Example Gallery - 7/7</title>
<link rel=stylesheet href="/galleries/test2/gallery.css" type="text/css">
<meta name=viewport content="width=device-width, initial-scale=1" />
</head>
<body>
<div class=content>
<div class="thumb previous">
<a href="/galleries/test2/6.html" >
<img title=Previous src="/galleries/test2/thumbs/6.jpg" />
</a>
</div>
<div class=full>
<img src="/galleries/test2/files/7.png"/>
</div>
<div class="thumb next">
<a href="/galleries/test2/8.html" >
<img title=Next src="/galleries/test2/thumbs/8.jpg" />
</a>
</div>
</div>
</body>
</html>
img {
max-width: 100%;
height: auto
} might actually work as expected. There seems to be some confusion in the element sizing because once you tell it to be flexible you should not assign more specific dimensions. .full img {
object-fit:contain;
max-width:100%;
max-height:100%;
margin: 0 auto;
}