PDA

View Full Version : PHP Photo Album (centered)



benslayton
08-06-2006, 12:03 AM
PHP Phot oAlbum

Script URL (on DD) (http://www.dynamicdrive.com/dynamicindex4/php-photoalbum.htm)

problem:
I can't get the photo album to center. I have tried <center>content</center> and I have also tried <div align="center">content</div>

Any clue?:)

blm126
08-06-2006, 01:27 AM
in the css(step 2) there is a line that says "float: left;". You may need to remove that.

jscheuer1
08-06-2006, 04:06 AM
That won't help too much though it is a good idea. It will allow centering but, it will also stack the images vertically. The way to center elements with as advanced styling as these isn't to use a container with align="center" or <center></center> tags. You do need a container though. Try:


<div style="width:650px;margin:0 auto;">

content

</div>

Where 650px is the width of however many images wide your gallery is plus their padding, margins, etc. (650px works well with the demo version of the script). This will require a DOCTYPE to work in IE.