Quick Tip: The Simplest Way To Center Elements Vertically And Horizontally | Tutorialzine
mardi 8 septembre 2015 à 14:07Marquetapages Shazen
```html
<div class="container">
<!--// Any content in here will be centered.-->
<img src="fireworks.jpg" alt="fireworks">
</div>
```
```css
.container{
display: flex;
justify-content: center;
align-items: center;
}
```
(Permalink)
```html
<div class="container">
<!--// Any content in here will be centered.-->
<img src="fireworks.jpg" alt="fireworks">
</div>
```
```css
.container{
display: flex;
justify-content: center;
align-items: center;
}
```
(Permalink)