Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

How do I rotate an image 90 degrees using HTML?

13 Answers

Relevance
  • 1 decade ago
    Favorite Answer

    It isn't well supported yet, but css3 allows you to rotate images and border images. Until it's supported, i would use an image editing program to rotate the image. But, if you want to try it, here's the code:

    <img src="path/imagename.jpg" style="image-orientation: 90deg;" />

    Here's more than you ever needed to know:

    Orienting an Image on the Page

    http://www.w3.org/TR/css3-page/

    The image-orientation property provides a way to specify a rotation to be applied to an image. This facility is not intended to specify other image transformations such as flipping the image in the horizontal or vertical direction. Also, this facility is not needed to correctly orient an image when printing in landscape versus portrait orientation.

    Name: image-orientation

    Value: auto | <angle>

    Initial: auto

    Applies to: images

    Computed value: specified value modulo full circle value

    'image-orientation' specifies a rotation in the right or clockwise direction that a user agent applies to an image. In terms of the order of transformations, the image is first rotated, then sized, then positioned. Thus height and width properties apply to the rotated rather than the original image dimensions.

    Two values for the 'image-orientation' property apply to an image:

    auto

    The image will be set to the orientation of the page. That is, for a pixelated image consisting of rows and columns of pixels, a row is displayed across the width of the display surface and a column along the height.

    <angle>

    A positive value rotates the image to the right (in a clockwise direction) by the given number of degrees. Negative values rotate to the left or in a counter-clockwise direction. Specified values outside the range of ]-360, 360[ degrees are moduloed by 360 to produce a computed value within that range. User agents MUST support values which compute to 0, 90, 180, and 270 degrees. Support for other values is optional.

    The following CSS examples rotate the image in four major orientations:

    img.original { image-orientation: auto }

    img.zero { image-orientation: 0 }

    img.ninety { image-orientation: 90deg }

    img.tilt { image-orientation: -1deg }

    ------------------------

    if you're interested in imaged borders:

    3.4.3 The 'border-image-transform' properties

    (see http://www.w3.org/TR/2002/WD-css3-border-20021107/ )

    These properties are used to specify that an image on the corner is a transform of the border-top-left-image or the images on the edge is a transform of border-top-image and border-left-image.

    The possible transforms on the corner images are:

    none

    Place the image without modification.

    rotate

    Rotate the image so that the side that would face the inner edge if it were placed on the top border remains facing the inner edge.

    reflect

    Flip the image so the sides that would be the inner edges of the image were it placed in the top left corner remain the inner sides.

    The possible transforms on the edge images are:

    none

    Place the image without modification.

    rotate

    Rotate the image so that the side that would face the inner edge if it were placed on the top border remains facing the inner edge.

    reflect-xy

    The image is assumed to be designed for the top or left sides. The right border image is reflected across a vertical axis and the bottom border image is reflected across a horizontal one.

    reflect-right

    The image is assumed to be designed for the top border. The right border image is rotated 90 degrees to the right; the left border image is rotated 90 degrees to the right and reflected across a vertical axis. The bottom border image is reflected across a horizontal axis.

    reflect-left

    The image is assumed to be designed for the top border. The left border image is rotated 90 degrees to the left. The right border image is rotated 90 degrees to the left and reflected across a vertical axis. The bottom border image is reflected across a horizontal axis.

  • Anonymous
    4 years ago

    Rotate Image Html

  • 5 years ago

    Html Rotate Image

  • Anonymous
    6 years ago

    This Site Might Help You.

    RE:

    How do I rotate an image 90 degrees using HTML?

    Source(s): rotate image 90 degrees html: https://tr.im/0lDxB
  • How do you think about the answers? You can sign in to vote the answer.
  • 5 years ago

    If you have employed in the past landscape gardeners for projects that ended up costing you tens of thousands of bucks then that other option is to make it easily from right here https://tr.im/utgkW Your way since , in the end and without this expertise, projects always cost a lot more and took longer than anticipated.

    Ideas4Landscaping is a extensive multimedia resource database of over 7000 large-resolution pictures and 300 systematic guides, themes and video tutorials for individuals hunting for landscape suggestions and inspiration all around their personal home.

    If you are a landscape gardening enthusiast of any sort, you must by Ideas4Landscaping, a package with a lot of fantastic components to stimulate task ideas.

  • 1 decade ago

    Use a software application like photoshop to do this. I am not aware of any html code that rotates images.

  • 6 years ago

    Use this in your stylesheet for the id = profile-picture :

    #profile-picture {

    -ms-transform: rotate(90deg); /* IE 9 */

    -webkit-transform: rotate(90deg); /* Chrome, Safari, Opera */

    transform: rotate(90deg);

    }

  • Anonymous
    1 decade ago

    DO THIS

    Go to PAINT

    Go to Image

    Flip/Rotate

    Rotate by Angle

  • Anonymous
    5 years ago

    That's an interesting question

  • Anonymous
    1 decade ago

    Just edit the file in Paint. Go to Image>Flip/Rotate>Rotate by Angle.

Still have questions? Get your answers by asking now.