Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Add alt text to pictures in define_main_page

Add alt text to pictures in define_main_page

Views: 739

Results 1 to 7 of 7
1 Aug 2011, 7:57 AM
#1
barendfaber avatar

barendfaber

Zen Follower

Join Date:
Apr 2010
Posts:
263
Plugin Contributions:
0

Add alt text to pictures in define_main_page

Hi,

I am working on https://www.blackorangevintage.com. On the home page at the bottom there are 3 pictures. I have added these to the define_main_page.php, and also gave each picture it's own Alternative Text. However when I hover with my mouse over the pictures, the alt text does not show like it does with the logo, but it is showing up in the Page Source. Can someone help me as to what I need to do to make the alt text show up for the 3 pictures on the home page?

1 Aug 2011, 9:16 AM
#2
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Add alt text to pictures in define_main_page

you should use title="" instead. the alt="" is shown when a picture can't be found on your server

1 Aug 2011, 9:19 AM
#3
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Add alt text to pictures in define_main_page

Using both 'title' and 'alt' would be the correct way.

1 Aug 2011, 9:43 AM
#4
barendfaber avatar

barendfaber

Zen Follower

Join Date:
Apr 2010
Posts:
263
Plugin Contributions:
0

Re: Add alt text to pictures in define_main_page

Thanks for the responses. How would I add these? When I add a picture to the main page, under the first tab (Image Info), I can add Alternative text which is what I have done. Where will I get the info you mention above, and can you give instructions on how I must do 1 picture, then I can do the rest?

1 Aug 2011, 10:04 AM
#5
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Add alt text to pictures in define_main_page

img src="" width="" height="" title="text here" alt="text here"

The above is just to give you an idea of how the 'title' attribute is used.

1 Aug 2011, 10:30 AM
#6
barendfaber avatar

barendfaber

Zen Follower

Join Date:
Apr 2010
Posts:
263
Plugin Contributions:
0

Re: Add alt text to pictures in define_main_page

Thanks. I have looked under View Source for the page, and found this for my 3 images:

<img alt="**Hermes Silk Scarf - Couvee D'Hermes**" src="http://www.blackorangevintage.com/includes/templates/all_business/images/Hermes Silk Scarf - Couvee D'Hermes.png" style="width: 227px; height: 260px; " /> <img alt="**Hermes Silk Scarf - Faubourg By Night**" src="http://www.blackorangevintage.com/includes/templates/all_business/images/Hermes Silk Scarf - Faubourg By Night.png" style="width: 227px; height: 260px; " /> <img alt="**Hermes Silk Scarf - Carpe Diem**" src="http://www.blackorangevintage.com/includes/templates/all_business/images/Hermes Silk Scarf - Carpe Diem.png" style="width: 227px; height: 260px; " /></p>

From the above I can see the alt tags, but on the site when I hover over any of the three bottom pictures, the alt text is not displayed. When I hover over the logo, "Vintage Chanel and Hermes Accessories" is displayed. How can I get my site to display the alt text for the bottom pictures?

1 Aug 2011, 1:47 PM
#7
barendfaber avatar

barendfaber

Zen Follower

Join Date:
Apr 2010
Posts:
263
Plugin Contributions:
0

Re: Add alt text to pictures in define_main_page

OK, figured this out. I had to go to includes/languages/english/html_includes/my_template and edit the define_main_page.php. I added title="xxxxx" next to the alt info, now it is showing.