Skip to content

Latest commit

 

History

History
13 lines (8 loc) · 643 Bytes

README.md

File metadata and controls

13 lines (8 loc) · 643 Bytes

css3-centered-divs

A universal and easy way for creating divs whose content is vertically or both horizontally and vertically centered.

Info:

Referece: Centering in CSS: A Complete Guide

If you like this solution, would you please follow me and/or star this project on Github? Thanks!

How To Use:

  1. Include the css file by adding <link href=".../css3-centered-divs.css" rel="stylesheet> inside your html element.
  2. Insert a <div class="centered-div">...</div> or <div class="vertically-centered-div>...</div> to wrap the content that you want to center.