Monday, September 5, 2016

Centering absolute divs horizontally

This is potentially useful snippet for centering an absolute div inside of it's relative parent:

left:0;
right:0;
margin-left:auto;
margin-right:auto;

It might be necessary to set width for the element too.


No comments:

Post a Comment

Ubuntu 12.04, 14.04, 16.04 - auto start an app or script before login

To run a command or application at startup, even before the user has logged in, you can use this file: /etc/rc.local The commands entered...