Center an Absolute Positioned Div

Published July 30, 2015 | Categories: Web Development
Need to center an absolute div on a page?
This is a simple CSS snippet will auto center an absolute positioned div. There are a few ways, but this bar far is the more simple approach.
.contentBlock {
width: {define width}
position: absolute;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
}
Recent Posts

Hello from Beaconville: High Ed Conference Wrap-Up
View this Story

Cue the Confetti: Celebrating 2022's Higher Ed Wins So Far
View this Story

Beacon Technologies Opens Second Location in Carolina Beach, NC
View this Story

Why You Need Audience Personas For Your Website Content
View this Story