Responsive Image Rotate

CSS Transform Rotate

The CSS rotate() function can be used to rotate any element in two dimensional space. The angle of rotation can be expressed in degrees, gradians, radians or turns.
At its simplest, the image can be given a class name using the new function in the EverWeb Shape inspector and the styles for that class inserte in the Head Code box in the page inspector.

<style>
.rotate{transform:rotate(355deg)}
</style>

Note that the rotate angle is 355°. Negative values are allowed so this can also be written as -5°.
Unless the image is round or square, it will require more space when rotated to clear the items above and below or the browser/device window edges depending on its orientation.
Fixed Width
In a fixed width design, this can be achieved by simply dragging it down to clear the items above and below (landscape orientation) or reducing its width (portrait orientation).
Responsive
On the assumption that most EverWeb users are now creating reaponsive sites, a solution is described below.

rotate responsive image
Rotate 355°

Responsive Image Rotate

Images without alt text and a figcaption are invisible to the search engines. Adding a caption in a text box isn't much use since the search engine spiders have no way of knowing that the text is related to the image.
The widget inserts the image with alt text in an HTML5 <figure> element. This allows the use of the <figcaption> elemnt to insert the caption.
Image
The image should be cropped to a width equal to the maximum width setting before importing into EverWeb. Borders don't work on a rotated image so the widget has controls for adding a box shadow instead.
Creating Space
To create the required extra space for the image when it is rotated, the container has a vertical spacing control and the <figure> has both a maximum width and percentage width controls. The amounts applied will depend on the orientation of the image and the angle of rotation.
Rotate
It is the image that is rotated rather than the containg <figure> element. The rotation control is a slider with a range of zero to 359°
Caption
Since the <figure> element doesn't move, there is an option to add a caption. This has controls for font family, fallback font, size, color, background color and opacity, padding and border radius.
The caption can be positioned top/bottom and left/right. The distance of the caption in relation to the container's edges can be set.
The EverWeb Widget API number box doesn't accept negative values so these are applied with checkboxes.
In the above example, the caption is positioned top and left and the values for both the X and Y-axis are -40px.
Widget
The widget is in the Responsive Image widgets pack. Follow the link below to find it …

EverWeb Widgets Blog
All Rights Reserved
© EverWeb Widgets -