View Full Version : Invalid code

12-10-2009, 12:26 PM
1) Script Title: AnyLink CSS Menu v2.2

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/anylinkcss.htm

3) Describe problem: when using images as anchor links, the instructions say to use the below code

<a href="http://www.dynamicdrive.com" class="menuanchorclass" rel="anylinkmenu4" data-image="news.gif" data-overimage="newsover.gif"><img src="news.gif" style="border-width:0" /></a>
This is not valid code, as data-overimage and data-image are not valid attributes. Any way to make this valid code?


12-10-2009, 01:43 PM
To do that and still use the script for the rollover would require either a custom DTD, or fairly extensive modification to the script to use a valid attribute. Frankly I'm a bit surprised that DD would use an invalid attribute for this. In the past he always piggybacked such information onto either the rel or rev attributes. An alternative would be to ignore this feature of the script and place code for a valid rollover on the image tag itself. Here's one: