View Full Version : PHP Photo Album : Edit CSS to Center while retaining 3 in a row.

02-17-2006, 03:17 AM

First off great script! Exactly what I was looking for and up to this point it had been very easy to work with. I appologize in advance if this subject has already been discussed, I performed a quick search and was unable to find the information...

I would like to center the gallery (row of three images) inside of a table.

If I set alignment in the table or by DIV it is ignored (I think the CSS is overriding it).

If I set the float alignment in the CSS to center it changes the output to a single image per row.

Since I don't have a ton of experience with CSS any help would be appreciated, the css I am using and screen shot of the current output follows...

/* Image Gallery CSS */

.slideshow{ /*CSS for DIV containing each image*/
float: left;
margin-right: 20px;
margin-bottom: 20px;

#navlinks{ /*CSS for DIV containing the navigational links*/
width: 400px;

#navlinks a{ /*CSS for each navigational link*/
margin-right: 8px;
margin-bottom: 3px;
font-size: 110%;

#navlinks a.current{ /*CSS for currently selected navigational link*/
background-color: transparent;

The image is an example when the css alignment is set to left.


The second image is an example when the css alignment is set to center.


Here is a mock up of what I am trying to achieve.


02-17-2006, 09:25 AM
See posts number 2 and 3 in this thread (http://www.dynamicdrive.com/forums/showthread.php?t=7726).