How to create a rhombus: (as shown in red) by transforming a square using css? Only points B and C must move. Original size of square is 25px by 25px.
I'm trying to achieve this result and would later rotate it 45 degrees so that it would look like a diamond. I think this can be done using the transform:matrix();
P.S. I want to try as much as possible to not use explorercanvas, since I'm trying to minimize script tags in the html.
-webkit-transform: rotate(45deg) skew(20deg, 20deg)
Change the skew values to affect how skinny your diamond gets. This will push out the other corners and you'll need to scale the whole object if maintaining the specific dimensions is a requirement.
Here's a jsfiddle with the transformation you described.
And some further reading on CSS transformations.