open the file …/scroll-top-and-bottom/tandb.php of version 2.0 and replace line Replace line 7 to 12 by the following code
[ Edited. Moderator Note: Please post code or markup snippets between backticks or use the code button. ]
<div style="display:none;" class="nav_up" id="nav_up">
<?php echo '<img alt="↑" width="32px" height="32px" src="' .plugins_url( 'scroll-top-and-bottom/icon/'.$wp_STAB_icon_Select.'_u.ico' , dirname(__FILE__) ). '" > '; ?>
</div>
<div style="display:none;" class="nav_down" id="nav_down">
<?php echo '<img alt="↓" width="32px" height="32px" src="' .plugins_url( 'scroll-top-and-bottom/icon/'.$wp_STAB_icon_Select.'_d.ico' , dirname(__FILE__) ). '" > '; ?>
</div>
I have been updated the file on the current version.
Thread Starter
tizz
(@tizz)
Thanks for your reply.
Sorry, it doesn’t work. I put your exact code in tandb.php (“up” and “down” in place of arrows).
I have the same two errors in HTML5 validator:
An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.
…/scroll-top-and-bottom/icon/11_u.ico" ></div><div style="display:none;" class=…
…/scroll-top-and-bottom/icon/11_d.ico" ></div><script>$(function(){var $elem=$(…
(I think these lines are in stab.php)
and the same two in GtMetrix results:
The following image(s) are missing width and/or height attributes.
http://www.mywebsite/wp-content/plugins/scroll-top-and-bottom/icon/11_d.ico
http://www.mywebsite/wp-content/plugins/scroll-top-and-bottom/icon/11_u.ico
Thread Starter
tizz
(@tizz)
Sorry, a quick update.
I have W3total cache, so I have now empty all caches.
No more GTmetrix errors (image dimensions), but now in validator there are 4 errors:
Bad value 32px for attribute width on element img: Expected a digit but saw p instead
/scroll-top-and-bottom/icon/11_u.ico" ></div><div style="display:none;" class=…
Syntax of non-negative integer:
One or more digits (0–9). For example: 42 and 0 are valid, but -273 is not.
…/scroll-top-and-bottom/icon/11_u.ico" ></div><div style="display:none;" class=…
Syntax of non-negative integer:
One or more digits (0–9). For example: 42 and 0 are valid, but -273 is not.
…/scroll-top-and-bottom/icon/11_d.ico" ></div><script>$(function(){var $elem=$(…
Syntax of non-negative integer:
One or more digits (0–9). For example: 42 and 0 are valid, but -273 is not.
…/scroll-top-and-bottom/icon/11_d.ico" ></div><script>$(function(){var $elem=$(…
Oh, I am sorry… I did the mistake, Replace width=”32px” height=”32px” as width=”32″ height=”32″, hope it will work…
<div style="display:none;" class="nav_up" id="nav_up">
<?php echo '<img alt="↑" width="32" height="32" src="' .plugins_url( 'scroll-top-and-bottom/icon/'.$wp_STAB_icon_Select.'_u.ico' , dirname(__FILE__) ). '" > '; ?>
</div>
<div style="display:none;" class="nav_down" id="nav_down">
<?php echo '<img alt="↓" width="32" height="32" src="' .plugins_url( 'scroll-top-and-bottom/icon/'.$wp_STAB_icon_Select.'_d.ico' , dirname(__FILE__) ). '" > '; ?>
</div>
Thread Starter
tizz
(@tizz)
Sure, to these last errors I could even get there by myself, but laziness won…
Thank you very much!