-
Images missing "ALT" text
Hello,
I am busy with optimizing the shop "www.airlinersbuyweb.com" using woorank.com and such programs.
One of the things they are complaining about is the alt text from images. Wel, I have updated the alt text and it is there, but it is not visible on screen.
Who can tell me how to solve that ?
An other problem wich i can't solve (and find) is the banner wich should contain a home-link an also the alt text is not visible !
Thanks in advange
ceesdk
-
Re: Images missing "ALT" text
Modern browsers don't display alt text on screen, only title text.
-
Re: Images missing "ALT" text
Quote:
Originally Posted by
RescoCCC
Modern browsers don't display alt text on screen, only title text.
My admin back-end displays the alt text from my banner and act as a home-link, this is what i need on the front-end !
Who has an idea ?
-
Re: Images missing "ALT" text
I'm not sure what you're referring to since I don't see any banners on your site. But, again, modern browsers do not display alt text on screen. They only display title text.
-
1 Attachment(s)
Re: Images missing "ALT" text
Quote:
Originally Posted by
RescoCCC
I'm not sure what you're referring to since I don't see any banners on your site. But, again, modern browsers do not display alt text on screen. They only display title text.
Hai, see image for what I call my banner, on my admin screen when I hover the mouse over that banner it shows a square with text and when I click on the banner it has a "home" function.
That does not happen on the front end banner !
-
Re: Images missing "ALT" text
The image in the admin is not the same image as the one that appears on the index page. The file is in a different location and has a different name. What you're seeing is the title text, not the alt text.
The image on the index page is acting as a background.
-
Re: Images missing "ALT" text
Quote:
Originally Posted by
RescoCCC
The image in the admin is not the same image as the one that appears on the index page. The file is in a different location and has a different name. What you're seeing is the title text, not the alt text.
The image on the index page is acting as a background.
Do you mean that the image on de index page can't act as a home link ?
-
Re: Images missing "ALT" text
Quote:
Originally Posted by
ceesdk
Do you mean that the image on de index page can't act as a home link ?
It can if you use it as the logo, but you're using it as the header. You don't have a logo installed.
-
Re: Images missing "ALT" text
Quote:
Originally Posted by
RescoCCC
It can if you use it as the logo, but you're using it as the header. You don't have a logo installed.
OK! which file do I need to change, I have being searching for it but there are about 20 (or more) header.php files
-
Re: Images missing "ALT" text
You would edit:
includes/languages/english/your_template/header.php
define('HEADER_LOGO_WIDTH', '1100px');
define('HEADER_LOGO_HEIGHT', '148px');
define('HEADER_LOGO_IMAGE', 'logo.jpg');
Download your header image, rename it to logo.jpg and then upload it to includes/templates/your_template/images.
Then in your stylesheet remove the line in red:
#logoWrapper{
background-image: url(../images/header_bg.jpg);
background-repeat: repeat-x;
background-color: #ffffff; /** wit */
width:1100px;
height:148px;
}
Then download and open includes/templates/your_template/common/ tpl_header.php Make sure that this section is NOT commented out:
<div id="logo">
<?php // echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?>
</div>
If it is commented out, uncomment it out and re-upload it.
-
Re: Images missing "ALT" text
Quote:
Originally Posted by
RescoCCC
You would edit:
@RescoCCC, I applied the changes you suggested but after that my
logo was'nt there anymore, so I have changed it all back as it was.
ceesdk
-
Re: Images missing "ALT" text
<!--<div id="logo"></div>--> this is your problem. Images called for out of the style sheet do not have alt text.
Put your logo in your templates images folder and name it logo.gif
Remove this <!--<div id="logo"></div>-->
and add this.
<div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>
how to add alt names to my images here
PS your alt text was not missing as you never added it
-
Re: Images missing "ALT" text
Then edit this
#logoWrapper {
/*background-image : url(../images/header_bg.jpg);
background-repeat : repeat-x; */
background-color : #ffffff;
width : 1100px;
height : 148px;
}
It baffles me as to why you would add image to the logo wrapper
All you needed to do was edit the logo.gif that was already there and make changes to the size in your includes/languages/english/your_template/header.php
-
1 Attachment(s)
Re: Images missing "ALT" text
Quote:
Originally Posted by
usernamenone
Then edit this
#logoWrapper {
/*background-image : url(../images/header_bg.jpg);
background-repeat : repeat-x; */
background-color : #ffffff;
width : 1100px;
height : 148px;
}
It baffles me as to why you would add
I am sorry to "baffles you", what ever it means, but I am not a php programmer and just trying to use Zen-cart. Which I like to do, only sometimes I need a little help !
I also need help with a printing problem printing the invoices. My logo is to small on the print (see attachment) and I can't find the
file or place to change the width on the print.
regards, ceesdk
-
Re: Images missing "ALT" text
I am sorry to "baffles you", what ever it means, but I am not a php programmer and just trying to use Zen-cart. Which I like to do, only sometimes I need a little help !
This is a xhtml not php
there are wrappers and inside those are content. You chose to use the wrapper to insert an image.... not the #logo style. (which by the way only needed to be removed from the rest of the styles and singled out)..... works but not the way to be done.
admin>includes>languages>english.php
define('HEADER_ALT_TEXT', 'Admin Powered by Zen Cart :: The Art of E-Commerce');
define('HEADER_LOGO_WIDTH', '200px');
define('HEADER_LOGO_HEIGHT', '70px');
I find it best to use only white background with simple text as to not use a bunch of ink to print invoices out........... They just need to know it came from you.
-
Re: Images missing "ALT" text
Quote:
It baffles me as to why you would add image to the logo wrapper
Uh, that's the way Zen Cart codes a header image. In the #logoWrapper.
-
Re: Images missing "ALT" text
Quote:
Originally Posted by
usernamenone
Then edit this
#logoWrapper {
/*background-image : url(../images/header_bg.jpg);
background-repeat : repeat-x; */
background-color : #ffffff;
width : 1100px;
height : 148px;
}
After your suggested changes my logo/banner is gone and I have only a white space.
-
Re: Images missing "ALT" text
Quote:
Originally Posted by
ceesdk
After your suggested changes my logo/banner is gone and I have only a white space.
That's what the /* in front of background-image: url(../images/header_bg.jpg); does.
-
Re: Images missing "ALT" text
Quote:
Originally Posted by
usernamenone
admin>includes>languages>english.php
define('HEADER_ALT_TEXT', 'Admin Powered by Zen Cart :: The Art of E-Commerce');
define('HEADER_LOGO_WIDTH', '200px');
define('HEADER_LOGO_HEIGHT', '70px');
I find it best to use only white background with simple text as to not use a bunch of ink to print invoices out........... They just need to know it came from you.
Well , I like to have some better appearance on the invoice, so I have the following in admin>includes>languages>english.php :
define('HEADER_ALT_TEXT', 'Airlinersbuyweb.com :: Buying Aircraft pictures on Canvas');
define('HEADER_LOGO_WIDTH', '1100px');
define('HEADER_LOGO_HEIGHT', '148px');
define('HEADER_LOGO_IMAGE', 'logo.jpg');
cees
-
Re: Images missing "ALT" text
Quote:
Originally Posted by
ceesdk
After your suggested changes my logo/banner is gone and I have only a white space.
That is because you did not follow the rest of the directions
!--<div id="logo"></div>--> this is your problem. Images called for out of the style sheet do not have alt text.
Put your logo in your templates images folder and name it logo.gif
Remove this <!--<div id="logo"></div>-->
and add this.
<div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>
-
Re: Images missing "ALT" text
does not do any good without the original image named logo.gif and the original php code in your header for the logoooooooooo
-
Re: Images missing "ALT" text
Quote:
Originally Posted by
usernamenone
That is because you did not follow the rest of the directions
!--<div id="logo"></div>--> this is your problem. Images called for out of the style sheet do not have alt text.
Put your logo in your templates images folder and name it logo.gif
Remove this <!--<div id="logo"></div>-->
and add this.
<div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>
I have done all your instructions, but I have used logo.jpg instead of logo.gif
-
Re: Images missing "ALT" text
Quote:
Originally Posted by
RescoCCC
That's what the /* in front of background-image: url(../images/header_bg.jpg); does.
@RescoCCC, thanks I know the function of /*, the thing i don't know is why in my admin screen that logo/banner acts as "home" link and shows the title text, and why it won't work in the catalog screen (front-end screen)
@usernamenone, hai, well it won't work the way we tried to solve this, perhaps to give it a try lateron.
thanks anyway !
Ceesdk
-
Re: Images missing "ALT" text
It works in your admin because it's coded as a logo. It isn't coded as a logo on your index page.
Check your includes/templates/your_template/common/ tpl_header.php file. Does this appear?
<div id="logo">
<?php // echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?>
</div>
-
Re: Images missing "ALT" text
Quote:
Originally Posted by
RescoCCC
It works in your admin because it's coded as a logo. It isn't coded as a logo on your index page.
Check your includes/templates/your_template/common/ tpl_header.php file. Does this appear?
<div id="logo">
<?php // echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?>
</div>
in admin it uses: "admin/includes/languages/english.php" that file has 4 defines those are :
define('HEADER_ALT_TEXT', 'Airlinersbuyweb.com :Buying Aircraft pictures on Canvas');
define('HEADER_LOGO_WIDTH', '1100px');
define('HEADER_LOGO_HEIGHT', '148px');
define('HEADER_LOGO_IMAGE', 'bannerbuyweb.jpg');
below the line in: includes/templates/your_template/common/ tpl_header.php file
<!--bof-branding display-->
<div id="logoWrapper">
<div id="logo"><?php // echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>
-
Re: Images missing "ALT" text
Do you have those define statements in includes/languages/english/your_template/header.php?
-
Re: Images missing "ALT" text
Quote:
Originally Posted by
RescoCCC
Do you have those define statements in includes/languages/english/your_template/header.php?
this is in : includes\languages\english\your_template\header.php
define('HEADER_ALT_TEXT', 'www.airlinersbuyweb.com :: Buy pictures of aircrafts on mugs, t-shirts, canvas and more [home link]');
define('HEADER_SALES_TEXT', '<h1>Buy your aircraft pictures</h1>');
define('HEADER_LOGO_WIDTH', '1100px');
define('HEADER_LOGO_HEIGHT', '148px');
define('HEADER_LOGO_IMAGE', 'logo.jpg');
-
Re: Images missing "ALT" text
Quote:
Originally Posted by
ceesdk
in admin it uses: "admin/includes/languages/english.php" that file has 4 defines those are :
define('HEADER_ALT_TEXT', 'Airlinersbuyweb.com :Buying Aircraft pictures on Canvas');
define('HEADER_LOGO_WIDTH', '1100px');
define('HEADER_LOGO_HEIGHT', '148px');
define('HEADER_LOGO_IMAGE', 'bannerbuyweb.jpg');
below the line in: includes/templates/your_template/common/ tpl_header.php file
<!--bof-branding display-->
<div id="logoWrapper">
<div id="logo"><?php // echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>
No. You have used the top code (languages)out of admin and the bottom code out of your catalog. Look at the code and instructions for each and apply the code where it belongs.
-
Re: Images missing "ALT" text
Quote:
Originally Posted by
usernamenone
No. You have used the top code (languages)out of admin and the bottom code out of your catalog. Look at the code and instructions for each and apply the code where it belongs.
This is how it is at the moment ! the 4 defines are used in the admin screen.
The other instruction is what you suggest I use in the catalog screen!
-
Re: Images missing "ALT" text
Ok and what is not working correctly for you?
-
Re: Images missing "ALT" text
Quote:
Originally Posted by
usernamenone
Ok and what is not working correctly for you?
OK! Then i have to go back to message #3, and using to right ?? terms
My admin screen displays the title text from my logo and act as a home-link, when I hover it or click on it (resp), this is what I like to see on the catalog (front end) screen to !
-
Re: Images missing "ALT" text
Quote:
My admin screen displays the title text from my logo and act as a home-link, when I hover it or click on it (resp), this is what I like to see on the catalog (front end) screen to !
Again, that's because the admin image is coded as a logo and the image on your index page is not. The image on your index page is coded as the header. If you look at the source for your index page you'll see this:
<!--bof-branding display-->
<div id="logoWrapper">
<div id="logo"></div>
<div id="taglineWrapper">
<div id="tagline"></div>
</div>
</div>
<br class="clearBoth" />
<!--eof-branding display-->
Note the code in red. That div is where the logo image is supposed to be linked. It is empty. You've changed the code in one of the files that generates this. Those files are all discussed in this thread. Try comparing them against original Zen Cart files.
-
Re: Images missing "ALT" text
If you will listen very carefully again
Images pulled out of the style sheet do not have alt text
This is still in your style sheet
#logoWrapper{
background-image: url(../images/header_bg.jpg);
background-repeat: repeat-x;
background-color: #ffffff; /** wit */
width:1100px;
height:148px;
}
1. Remove the image out of your style sheet
2. Open your template>common>tpl_header.php
3. make sure the original code for logo is intact
Code:
<div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>
-
Re: Images missing "ALT" text
Quote:
Originally Posted by
RescoCCC
You've changed the code in one of the files that generates this. Those files are all discussed in this thread. Try comparing them against original Zen Cart files.
@RescooCCC and @usernamenone, Got him !, the instructions were OK! in message #5? There was a problem with uncommenting in file
tpl_header.php, I did uncomment it but halfway the line there were two "//" which I overlooked. By comparing the file with the original file I found the fault. see after <?php echo
<div id="logoWrapper">
<div id="logo"><?php echo // '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($te
He, Both thanks for your patience to solve this !
regards, Ceesdk
-
Re: Images missing "ALT" text
[QUOTE=usernamenone;1089440]If you will listen very carefully again
hai, we where writing at the same time !
-
Re: Images missing "ALT" text
Excellent. Glad you got it solved.
-
Re: Images missing "ALT" text
Cheers, Merry Christmas :smartalec: