CSS -Zentrumbild
.center {
display: block;
margin-left: auto;
margin-right: auto;
}
Unusual Unicorn
.center {
display: block;
margin-left: auto;
margin-right: auto;
}
html:
<img src="paris.jpg" alt="Paris" class="center">
css:
<style>
.center {
display: block;
margin-left: auto;
margin-right: auto;
width: 50%;
}
<style>
.centerImg {
display: block;
margin: 0 auto;
}
<div class="verticalhorizontal">
<img src="image.jpg" alt="centered image" />
</div>
<style>
.verticalhorizontal {
display: table-cell;
height: 300px;
text-align: center;
width: 300px;
vertical-align: middle;
}
</style>
.center {
display: block;
margin-left: auto;
margin-right: auto;
width: 50%;
}
.someclass {
display: block;
margin-left: auto;
margin-right: auto;
}