LiveWithPassion LiveWithPassion - 8 months ago 73
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?



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