Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

How do you rotate images in css?

For example, I have upside down pictures in my website right now, how would I rotate them?

3 Answers

With something like this, you may need the vendor prefixes too I think.

img.flip{
    transform: rotate(180deg);
}

You mean they are upside down because of something like taking the pictures with the camera upside down?

I realize you are asking about a css solution here but I think that you should fix them in an image editing application if that's the case.

This link will most likely answer your question: http://www.w3schools.com/cssref/css3_pr_transform.asp

As w3schools has some issues with credibility so I usually suggest these instead:

In this case: the 2d transform section on Shay Howe's Advanced HTML & CSS guide can offer some help.

Yes, we have to stop giving them links. It's bad when they come up higher in search results than the w3c.

I see. Well in this specific problem w3s is providing correct code. Thanks for the link though your explaining why they are not a suitable choice.