centre align image in div
body {
margin: 0;
}
#over img {
margin-left: auto;
margin-right: auto;
display: block;
}
centre align image in div
body {
margin: 0;
}
#over img {
margin-left: auto;
margin-right: auto;
display: block;
}
vertical align image in div
<div class="frame">
<img src="foo"/>
</div>
.frame {
height: 160px; /* Can be anything */
width: 160px; /* Can be anything */
position: relative;
}
img {
max-height: 100%;
max-width: 100%;
width: auto;
height: auto;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us