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

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

Going for Gold: Beacon's Account Executives Go Above and Beyond Again
View this Story

Combat Dropping Enrollment Rates: See What This Community College is Doing To Bring in More Students
View this Story

Beacon is Hiring! Come Join Our Team
View this Story