Perfectly Centered via CSS

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

One thing that has always been a struggle is how to perfectly center an object (for example, a DIV) both horizontally and vertically on a page. 

The other night I was searching for a better way to do this via CSS instead of using nested tables.  I came across Dead Centre, a website that demonstrates exactly how to accomplish this.  You can see some of the detail on the webpage itself, but also take a look at the source for more details on how this was executed.

This provided a truly dynamic design that was 100% CSS-based and works across all browsers.

More to explore...

#WindowsUglySweater is back!

It’s back again for the holiday season, and this year it shows-off everybody’s favorite 8-bit drawing app – MS Paint! The previous

One Response

  1. Hello! Really amazing CSS trick. I needed just this, it’s ingenious that he hides the “ruler” in the end! 😀

Leave a Reply to Edward Cancel reply

Your email address will not be published.