0

Hi everyone.
So I have a shopping cart which has a product details.
The thing is, the photo is taken from the database but it is just a plain photo.
I want to make it more pretty, so I want to add the prettyphoto script to it.
Basically I have this code now:

<table width="100%" border="0" cellspacing="0" cellpadding="10">
 <th> 
  <td align="center"><img src="<?php echo $pd_image; ?>" border="3" alt="<?php echo $pd_name; ?>"></td>
  <td valign="middle">
 <strong><?php echo $pd_name; ?></strong><br>
 Price: <?php echo displayAmount($pd_price); ?><br>

And to the picture I like to add the PrettyPhoto script, which is something like this:

<div class="portfolioItem3"> <a class="threeColumnsImage" href="./images/portfolio/threeColumnsL1.jpg" rel="prettyPhoto" title="Lorem ipsum dolor sit amet"><img src="./images/portfolio/threeColumns1.jpg" alt="" /></a>

The thing is, it works in a way, but after I click on the image, it starts to load and it says:

The image cannot be loaded. Make sure the path is correct and the image exists.

So I think that that's something to do with the href="" in the prettyPhoto script. But since I take the pictures from the database, how can I do this to work?

Thanks!

Edited by didi00: n/a

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by didi00
1
<td class="portfolioItem3"> <a class="threeColumnsImage" href="./images/portfolio/threeColumnsL1.jpg" rel="prettyPhoto" title="Lorem ipsum dolor sit amet"><img src="./images/portfolio/threeColumns1.jpg" alt="" /></a></td>

Is that what you're looking for?

You're mixing html attributes and class for CSS. Get rid of all the html attributes and describe them in CSS.

So is this what you want at the end?

<td class="portfolioItem3">
<a class="threeColumnsImage" href="<?php echo $pd_image; ?>" rel="prettyPhoto" title="<?php echo $pd_name;?>">
<img src="<?php echo $pd_image; ?>" border="3" alt="<?php echo $pd_name; ?>">
</a>
</td>
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.