Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 29, 2012 09:32 PM by robwscott
Member
15 Points
109 Posts
Mar 29, 2012 07:53 PM|LINK
using C# in VS2010 .NET 4 Web Application; Seems simple, but can someone please:
1) Share an example of how to rotate labels in a webform, so they display text vertically(tall).
2) The label has to display text from an sqlDataSource (bound to display a field).
Thank you
Participant
836 Points
285 Posts
Mar 29, 2012 08:38 PM|LINK
You can read this MSDN article: How to: Rotate Text
http://dotnetcoderoom.wordpress.com/2008/08/05/rotate-a-label-text/
Mar 29, 2012 08:53 PM|LINK
Thank you for the reply. It does rotate when adding style=”writing-mode:tb-rl”. Do you also have reference to adjust the alignment? Currently defaults to text reading down from top of label.
Mar 29, 2012 09:08 PM|LINK
I am not sure about that may be this link helps
http://stackoverflow.com/questions/4460258/c-rotated-text-align
Star
8079 Points
1491 Posts
Mar 29, 2012 09:32 PM|LINK
can you not just rotate the div???
<div id="someDiv"> <asp:Label id="Label1" runat="server" /> </div> #someDiv { writing-mode:tb-rl; -webkit-transform:rotate(90deg); -moz-transform:rotate(90deg); -o-transform: rotate(90deg); white-space:nowrap; display:block; bottom:0; width:20px; height:20px; }
http://scottgale.com/blog/css-vertical-text/2010/03/01/
Wesolek
Member
15 Points
109 Posts
How to rotate labels to display vertical\tall on a webform?
Mar 29, 2012 07:53 PM|LINK
using C# in VS2010 .NET 4 Web Application; Seems simple, but can someone please:
1) Share an example of how to rotate labels in a webform, so they display text vertically(tall).
2) The label has to display text from an sqlDataSource (bound to display a field).
Thank you
Inayat Rasoo...
Participant
836 Points
285 Posts
Re: How to rotate labels to display vertical\tall on a webform?
Mar 29, 2012 08:38 PM|LINK
You can read this MSDN article: How to: Rotate Text
http://dotnetcoderoom.wordpress.com/2008/08/05/rotate-a-label-text/
Wesolek
Member
15 Points
109 Posts
Re: How to rotate labels to display vertical\tall on a webform?
Mar 29, 2012 08:53 PM|LINK
Thank you for the reply. It does rotate when adding style=”writing-mode:tb-rl”.
Do you also have reference to adjust the alignment? Currently defaults to text reading down from top of label.
Inayat Rasoo...
Participant
836 Points
285 Posts
Re: How to rotate labels to display vertical\tall on a webform?
Mar 29, 2012 09:08 PM|LINK
I am not sure about that may be this link helps
http://stackoverflow.com/questions/4460258/c-rotated-text-align
robwscott
Star
8079 Points
1491 Posts
Re: How to rotate labels to display vertical\tall on a webform?
Mar 29, 2012 09:32 PM|LINK
can you not just rotate the div???
<div id="someDiv"> <asp:Label id="Label1" runat="server" /> </div> #someDiv { writing-mode:tb-rl; -webkit-transform:rotate(90deg); -moz-transform:rotate(90deg); -o-transform: rotate(90deg); white-space:nowrap; display:block; bottom:0; width:20px; height:20px; }http://scottgale.com/blog/css-vertical-text/2010/03/01/
Mark Answered if it helps - Good luck!
Cheers!
Design And Align
- Rob