PDA

View Full Version : PHP Photo Album Help



doublesnaggle
02-24-2012, 08:48 PM
1) Script Title: PHP Photo Album script v2.11

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

3) Describe problem:

Im trying to figure out how to adjust the properties of the manual text descriptions.

As they are, they all default to the left and there are no choices for font or size or color.

I don't mind donating $ if that will help out. :o

jscheuer1
02-24-2012, 09:21 PM
You mean left justified? Um, the situation is a little restrictive, but not as restrictive as I think you may think it is. Here's what a typical div with a thumbnail in it looks like (these are created by the script):


<div class="photodiv">
<img src="http://www.dynamicdrive.com/dynamicindex4/phpgallery/jag1.jpg" data-index="0">
<br>
Photo 1
</div>

So you can control the description by using css style for the class. Like in the css file:


.photodiv {
text-align: center;
color: red;
font-family: sans-serif;
font-size: 12px;
}

Make sure if you set the width and/or height for this class that it leaves enough room for the image and description.

FYI, if you're using the default css file for this script it already has:


.photodiv {
float: left;
margin-bottom: 10px;
margin-right: 10px;
}

And governing the image in the photdiv:


.photodiv img {
border: 0px none currentColor;
cursor: pointer;
height: 106px;
width: 200px;
}

The width of the image will pretty much govern the width of the division unless you decide not to allow the text to wrap.

If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.

doublesnaggle
02-24-2012, 10:22 PM
In the example here:
http://www.dynamicdrive.com/dynamicindex4/php-photoalbum.htm


You can see the words photo 1 photo 2

Those are the photo descriptions I want to center under my thumbs. You can see they are left justified.

In your examples isn't that the code for page buttons?

Obviously Im new at this. Please don't beat me.

jscheuer1
02-25-2012, 01:28 AM
Obviously Im new at this. Please don't beat me.

That would be pretty hard to do, but I think I know what you mean.

But no, what I gave you would take care of it. But perhaps I gave you too much information. If so, forget about all that for the moment - it's all still valid and you can refer back to it later. For now though, simply add (using a text only editor like NotePad) the highlighted as shown in the ddphpalbum.css file:


/* ######### CSS for PHP Photo Album itself ######### */

.photodiv{ /*CSS for DIV containing each image*/
float: left;
margin-right: 10px;
margin-bottom: 10px;
text-align: center;
}

.photodiv img{ /*CSS for each image tag*/
border: 0;
width: 20 . . .