The following code displays an item picked at random from a database.
The container div is split into 3 sections:- Product Name, Product Image and price. The container div has a background image over which the 3 items appear.
This works OK but I want to make this into a single hyperlink but of course I cannot enclose divs inside a hyperlink as this code breaks the rules.
I can't just put all three items into the container div as the product name can take up 1,2 or 3 lines, which will vary the overal length.
I could do it with 3 separate hyperlinks but I would like the whole container div to be the link, how do I do this and keep within the rules?
Keith
The container div is split into 3 sections:- Product Name, Product Image and price. The container div has a background image over which the 3 items appear.
Code:
[red]
<a href='link'>
[/red]
<div class='ProductContainer'>
<div class='prod'>
Product Name
</div>
<div class='im'>
Product Image
</div>
<div class='price'>
Price
</div>
</div>
[red]
</a>
[/red]
I can't just put all three items into the container div as the product name can take up 1,2 or 3 lines, which will vary the overal length.
I could do it with 3 separate hyperlinks but I would like the whole container div to be the link, how do I do this and keep within the rules?
Keith