/*attention, i used this code because i had to center a div with text in another div without text*/ div{ position: relative; top: 25%; bottom: 25%; }