| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
| "http://www.w3.org/TR/html4/loose.dtd"> |
| <html lang="en"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| <title>Transform with Abs. Pos child</title> |
| <style type="text/css" media="screen"> |
| #box { |
| position: relative; |
| margin: 50px; |
| width: 200px; |
| height: 200px; |
| border: 2px solid black; |
| transform: rotate(0deg); |
| } |
| #box.rotated { |
| transform: rotate(40deg); |
| } |
| #child { |
| position: absolute; |
| width: 400px; |
| height: 50px; |
| top: 75px; |
| left: 75px; |
| background-color: gray; |
| } |
| </style> |
| </head> |
| <body> |
| <div id="box" class="rotated"> |
| <div id="child"> |
| </div> |
| </div> |
| </body> |
| </html> |