DEV Community

Discussion on: Different Ways to Center a Div in a Webpage

Collapse
mrtoxas profile image
mrtoxas
<div style="display:table;height:100%;width:100%;">
  <div style="display:table-cell;vertical-align:middle;text-align:center;">
    Lorem, ipsum.
  </div>
</div>

This method is helpful when creating popups with a scrollbar