Jump to content

I need some help with an alt tag for an image.


vet911

Recommended Posts

I need some help with an alt tag for an image. I can't get it to show up, your help will be appreciated. This is my code inside a div. I need it to show up when you move your mouse over the image like it would normally do.

Because of the php code I can't seem to find out how to do it.

 

 

<div style="float: left;"><a href="tn1_1.php?search=<?php echo $title; ?>"><img src="<?php echo $tn; ?>"><h4><?php echo $title; ?></h4></a></div>

The text that displays when you leave the cursor over an image doesn't go in the alt= attribute, it goes in the title= attribute, which isn't even present in your <img> tag set.

<div style="float: left;">
<a href="tn1_1.php?search=<?php echo $title; ?>">
<img src="<?php echo $tn; ?>" title="<?php echo $title; ?>" alt="<?php echo $title; ?>" />
<h4><?php echo $title; ?></h4>
</a>
</div>

 

I Think thats what you are after ...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.