2017
CSS - ONLINE TOOL - How to Center in CSS
by 3 othersCentering in CSS is a pain in the ass. There seems to be a gazillion ways to do it, depending on a variety of factors. This consolidates them and gives you the code you need for each situation.
Select the type of content you want to center in a parent div and the size of the parent.
2015
CSS - html - Horizontally center a div in a div - Stack Overflow
Centering a div of unknown height and width
Horizontally and vertically. Works with reasonably modern browsers (FF, Safari/Webkit, Chrome, IE10, Opera, etc.) ____
.content {
position: absolute;
left: 50%;
top: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
2014
CSS - Centrer en CSS - OpenClassRoom
Tous les cas solvables en pur CSS, et tant qu'à faire montrer comment les résoudre.
Accrochez-vous, c'est parti !
2013
CSS - Centering in the Unknown | CSS-Tricks
When it comes to centering things in web design, the more information you have about the element being centered and its parent element, the easier it is. So what if you don't know anything? It's still kinda doable.
1
(4 marks)