Template:Easy CSS image crop 2/doc
Appearance
This is a documentation subpage for Template:Easy CSS image crop 2. It may contain usage information, categories and other content that is not part of the original template page. |
This is an earlier form of Template:Easy CSS image crop that uses pixel sizes for the crops instead of percentages, which is a little unintuitive when the base image you're cropping from changes based on the desired end width.
{{Easy CSS image crop
|Image = The Name of the image file, or may accept {{Annotated image}}.
|desired_width = How wide the image should be after cropping.
|crop_left = Amount to crop from the left. This is in pixels, technically. See below.
|crop_right = Amount to crop from the right.
|crop_top = Amount to crop from the top.
|crop_bottom = Amount to crop from the bottom.
|Location = 'right', 'left', 'center' or 'none'. Determines placement of the image on the page
Defaults to 'right' when description is provided (as is default for thumb images)
When description is blank, location on left (as is default for non-thumbs)
|Description = Description (will render out using thumbnail class)
|Link = Name of an article to be linked by clicking on the image (omit unless there is a
good reason to link to an article instead of the image).
|Alt = The alt text for the image.
|Page = The page of the file, if there are multiple pages (such as pdf files).
|magnify-link = The image to be linked by the magnify icon (Use if the Image parameter is set to
{{Annotated image}} or the Link parameter leads to something other than the image).
}}
For the crop parameters, note that since we're going for a desired width, the size of the image being cropped from will vary depending on what crop_left
and crop_right
are set to. As such, these should be set before playing with crop_top
and crop_bottom
. All default to 0, which means nothing is cropped from that side.