v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "Template:Imagefix/doc"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
(Created page with "The '''imagefix''' template is a very simplistic CSS-based template that simply bumps images down by a few pixels. The purpose of the template is to make images better align w...")
 
Line 1: Line 1:
The '''imagefix''' template is a very simplistic CSS-based template that simply bumps images down by a few pixels. The purpose of the template is to make images better align with the text right next to them, instead of looking like the image is slightly higher than the text. It moves the image down by 5 pixels by default, but this value can be customized.
+
The '''imagefix''' template is a very simplistic CSS-based template that simply bumps images down by a few pixels. The purpose of the template is to make images better align with the text right next to them, instead of looking like the image is slightly higher than the text. It moves the image down by 4 pixels by default, but this value can be customized by adding a second value. There is padding-right value in the template that is 8 by default (which pushes the text right of the image to be pushed further right), but this can also be customized by adding a third value.
  
 
==Syntax==
 
==Syntax==
The syntax of the template is typed out like this: <code><nowiki>{{imagefix|[[File:IMAGE_FILE.png]]}}</nowiki></code><br>
+
The syntax of the template is typed out like this: <code><nowiki>{{imagefix|[[File:IMAGE_FILE.png]]|MARGIN|PADDING}}</nowiki></code><br>
However, if you want the image to be moved down further
+
The "margin" and "padding" values are optional, and one or both can be left completely blank.
  
 
==Examples==
 
==Examples==
 
[[File:dog_sprite.png|left]]Template unused. Notice how this very text does not align with the image.
 
[[File:dog_sprite.png|left]]Template unused. Notice how this very text does not align with the image.
 
<br>
 
<br>
 +
However, using the template with this syntax: <code><nowiki>{{imagefix|[[File:dog_sprite.png]]}}</nowiki></code> will produce this...<br><br>
 
{{imagefix|[[File:dog_sprite.png]]}}Template used. Now the top pixels of the same image align properly with the text.
 
{{imagefix|[[File:dog_sprite.png]]}}Template used. Now the top pixels of the same image align properly with the text.

Revision as of 05:15, 20 January 2023

The imagefix template is a very simplistic CSS-based template that simply bumps images down by a few pixels. The purpose of the template is to make images better align with the text right next to them, instead of looking like the image is slightly higher than the text. It moves the image down by 4 pixels by default, but this value can be customized by adding a second value. There is padding-right value in the template that is 8 by default (which pushes the text right of the image to be pushed further right), but this can also be customized by adding a third value.

Syntax

The syntax of the template is typed out like this: {{imagefix|[[File:IMAGE_FILE.png]]|MARGIN|PADDING}}
The "margin" and "padding" values are optional, and one or both can be left completely blank.

Examples

Dog sprite.png

Template unused. Notice how this very text does not align with the image.


However, using the template with this syntax: {{imagefix|[[File:dog_sprite.png]]}} will produce this...

Dog sprite.png

Template used. Now the top pixels of the same image align properly with the text.