Slade Slade - 5 months ago 13
PHP Question

How do I get my Alt image text to display correctly?

I was wondering...if any coding expert out there could spare a few minutes to help me out with a tiny problem? It's something to do with the alt image text.

You see, whenever I upload an image, the alt text for it doesn't display properly. You can have a look here --> http://buywerewolfcostume.com/. This is how it's displaying in the source code:

alt="Female-vampire-small.jpg"


alt="side_farm_trap_1.jpg"


How do I get it to display like this -

alt="Female Vampire" and alt="Side Farm Trap"


I tried installing a special Alt image plugin, (the site is built on a Wordpress platform) but that didn't work. I also tried editing the image settings but that didn't work either. Is there a special line of code I should add to the CSS stylesheet?

Btw, here is the image code in my stylesheet:

.images img {padding:0 13px 0 0;}


.images img.last {padding-right:0;}


I'd really appreciate it if anyone out there could please offer some advice...

Answer

in your index file where is says

<div class="images" style="padding-top:10px; "><?php get_images(); ?></div>

You might as well just replace with your images and then you can make the alt tags what ever you want.

<div class="images" style="padding-top: 10px;">
<img alt="Female Vampire" src="http://buywerewolfcostume.com/wp-content/uploads/Female-vampire-small.jpg">
<img class="last" alt="Side Farm Trap" src="http://buywerewolfcostume.com/wp-content/uploads/side_farm_trap_1.jpg">
</div>