Template:Click

From BattleMaster Wiki
Revision as of 21:40, 7 January 2008 by Indirik (talk | contribs) (Limitations of the template)
Jump to navigation Jump to search
Usage: {{Click | image=myimage.png | link=PageName | width="width"px | height="height"px}}

This template attempts to superimpose an invisible link on an image, such that clicking on the image does not take you to the image description page (normal behaviour).

It's useful for small icons/logos which are representative of an article, and which a user might click on expecting to be taken to that article.

Limitations

These are some things I have noticed while using this template. I'm not enough of an HTML guru to figure out why, let alone fix it.

  1. Apparently you can only have a max image size of 100 pixels for the thumbnail. This is probably due to the "line-height: 100px;" parameter in the template. I don't know enough about HTML to figure out what would happen if I were to change that parameter. Would it still work in all cases? Why not just use the "height" parameter there, rather than hardcode the line height? I dunno, I copied it from Wikipedia...
  2. It appears to work best with square thumbnail graphics. (Or possibly with graphics that are taller than they are wide.) I tired a 100px by 79px garphic, and the right side was not completely covered by the hotlink.

See also