transform:translate();

css absolute positioning to center element #element { position:absolute; left:50%; top:50%; transition:translate(-50%, -50%); }

Flexbox

Flexbox eg for notepad. <ul id=”parent”> <li>content</li> <li>content</li> <li>content</li> <ul> #parent { display:-webkit-flex; display:flex; justify-content:space-between; align-items:center; align-content:space-between; flex-wrap:wrap; } flexbox guide