PDA

View Full Version : div align option


richcodesign
07-09-2009, 01:14 PM
<div id="mainContent">
<div class="photo" align="center">


Why wont the above work?
ie: align the content of my div center???

DWcourse
07-09-2009, 02:17 PM
align="center" should center the content within the div with class "photo." Although it would be better form to do it by adding a property to the photo style: text-align: center;

To center the embedded div, give it a width and set the left and right margins to auto in the photo style.

richcodesign
07-09-2009, 03:12 PM
perfect.... the left and right margins to auto worked a charm!!!