2012-08-10

How to rotate an asp:Lable

There is actually no one perfect code which works in every browser. We have to make use of few codes together in order to get it work in all the major browsers. Following demonstrates how to rotate a label text by 90 degrees.

<style>
  .test
  {
    -moz-transform: rotate(90deg); /* FF3.5+ */
    -o-transform: rotate(90deg); /* Opera 10.5 */
    -webkit-transform: rotate(90deg); /* Saf3.1+, Chrome */
    filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=90); /* IE6,IE7 */
    -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=90)"; /* IE8 */
    -sand-transform: rotate(90deg);
  }
</style>

<asp:Label ID="lblCaseIDVert" runat="server" style="z-index: 100; left: 33px; position: relative; top: 98px" Height="1px" Width="192px" CssClass="test"></asp:Label>

No comments: