If you wish to get a fully centered content you might have some times problems.

I tried multiple times to use javascript and other script like jQuery to fully center a content. But there is an easier way: CSS

The next code can help you center everything. You must follow the HTML code presented bellow:

<div class="centeringdiv">
  <div class="child">What is here is centered</div>
.centeringdiv {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100px;
You might find interesting:   How to make Unselectable text from CSS


Please enter your comment!
Please enter your name here