tags:

views:

88

answers:

4

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...

A: 

This is a simple matter in html:

<img src="side_farm_trap_1.jpg" alt="Side Farm Trap" >

Edit after retagging: Does Wordpress hide the option to add alt text or a title to images?

Ray
Thanks. Wordpress does have an option to enter alt image text, and I did try this at first. But for some unfathomable reason, it still does not display properly...
Slade
A: 

Not sure I totally follow, but does this work for you?

<img src="Female-vampire-small.jpg" alt="Female Vampire" title="Female Vampire" />

The Alt tag is for when the image is for some reason NOT there. The alt text will show up in it's place
The Title tag is displayed as a tooltip in the browser

Note: IE used to display the Alt tag as a tooltip as well, but it no longer does.

rockinthesixstring
Thanks, but where in the stylesheet do I insert it? Btw, I didn't have this problem with my previous sites. I installed a new theme for my current site and unfortunately, the alt img text does not display properly.
Slade
This is not in your stylesheet, it is in your HTML. Cascading Style Sheets can not input content into your page, it is only for styling the look of the content.
rockinthesixstring
Also, in your wordpress app, you would use the HTML view inside the WYSIWYG editor in order to insert the ***Alt*** and ***Title*** tags
rockinthesixstring
I just checked my index.php file, and here is what is displayed:<div class="images" style="padding-top:10px; "><?php get_images(); ?></div> <?php } ?>Do I need to add some code in here somewhere, so the alt txt shows up correctly?
Slade
A: 

When you upload an image via WordPress, put the text you want to show up as 'alt text' both in the "Title" field and in the "Alternative Text" fields. Then click the "Insert Into Post" button.

Here's a video about uploading an image via the WordPress interface. In this video the "alternative text" field is called "caption". In newer versions of WordPress, "caption" and "alternative text" are separated out into different fields. The "caption" field shows up as a caption underneath your image; the 'alternative text' (or 'title') field is what shows up on hover/mouseover. Experiment to see what works best for you.

http://wordpress.tv/2009/01/05/embedding-photos-video-audio-into-your-posts/

Best of luck!

McGirl
I did try this method to no avail, but thanks to User mdskinner, my Alt txt problem is now solved! Thank YOU for taking the time to reply to my post. :)
Slade
A: 

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"&gt;
<img class="last" alt="Side Farm Trap" src="http://buywerewolfcostume.com/wp-content/uploads/side_farm_trap_1.jpg"&gt;
</div>
mdskinner
It worked! I inserted the new code you suggested and my Alt text is finally displaying correctly. You've been really helpful. Thanks a LOT! :)
Slade