Template:Easy CSS image crop 2
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.
<syntaxhighlight lang="wikitext">
<div class="thumbinner" style="width: Expression error: Unrecognized word "how".px;"> <div class="thumbimage" style="width: How wide the image should be after cropping.px; height: Expression error: Unexpected < operator.px; overflow: hidden;">
<div style="position: relative; top: -Expression error: Unexpected < operator.px; left: -Expression error: Unexpected < operator.px; width: Expression error: Unrecognized word "how".px"></syntaxhighlight>
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.