User:Trev M/ThumbTid
This template, intended to closely resemble the standard wiki thumb box, adds a specifiable anchor place ABOVE the image, so that links to the image scroll the image to the top of the screen, and not off the top, as would happen if the anchor were included in the caption of a normal thumb box.
Please consider this a Beta, and let me know what happens when you use it.
Notes at bottom of page.
Demonstration text: style="margin:4px;margin{{#ifeq:{{trim|1={{{2|}}}}}|left|-left|-right}}" puts a few pixels to whichever is the INSIDE of the box so as body text doesn't [sometimes] run ito it. /Demonstration text.
Demonstration text: style="margin:4px;margin{{#ifeq:{{trim|1={{{2|}}}}}|left|-left|-right}}" puts a few pixels to whichever is the INSIDE of the box so as body text doesn't run ito it. The image on the right is the standard wiki thumb box. /Demonstration text.
Test # link to top image DIV with id=itestid #itestid
Notes
[edit]The default id parameter is "i (so as id tag doesn't get parsed out at any point) + 0 (substitute for your string)"; remember, more than one id tag of same name will cause glitches, so edit in a different id for every use of template even if you dont intend to use it as an anchor etc. May try to auto increment this in future, if it becomes a nuisance.
Alterations to the template don't render fully in preview mode (in User: space, at least), only after a save and a reload or re-open edit window.
Default size of container box set to 207px. Adding width=[number]px to the paramaters outside the image ones will right-crop the contained image or give whitespace around it. If this is a nuisance, may try and make widths track in future.
- After period of use, this facility to independantly adjust the width of the outer box is proving stylistically useful but needs to be easier to manipulate and recognise.
- Could the "scroll to" link text be included in the template - to abreviate the recurring input?
style="margin:4px;margin{{#ifeq:{{trim|1={{{2|}}}}}|left|-left|-right}}" puts a few pixels to whichever is the INSIDE of the box so as body text doesn't run ito it.