LiveWithPassion LiveWithPassion - 1 year ago 132
HTML Question

CSS align center

I have a div that is width 100% and height 100%. Inside I have a 200px x 200px div. I'd like the 200px x 200px to align to the vertical and horizontal center of the outer div. Like in Photoshop when you align to the vertical or horizontal center. I've only been able to align from the edges so far. Is this possible?


Answer Source

You can use margin:0 auto; for set automatic margin according to your page position.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download