Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Left Align Text In Server Button

Reply
Thread Tools

Left Align Text In Server Button

 
 
DM
Guest
Posts: n/a
 
      01-31-2004
Is there any way to left align the text in a server control button?


 
Reply With Quote
 
 
 
 
Jos
Guest
Posts: n/a
 
      01-31-2004
DM wrote:
> Is there any way to left align the text in a server control button?


style="width:200px;text-align:left"

--

Jos Branders


 
Reply With Quote
 
 
 
 
Nakul
Guest
Posts: n/a
 
      02-01-2004
Hi,

Try this

<asp:Button id="Button1" runat="server" Text="Button" Width="256px"
style="TEXT-ALIGN: left"></asp:Button>

This align the text left for the button

Thanks
Nakul



"DM" <danmorrissey-nos-pam-@cfl.rr.com> wrote in message
news:...
> Is there any way to left align the text in a server control button?
>
>



 
Reply With Quote
 
=?Utf-8?B?dHN3YW5zb24=?=
Guest
Posts: n/a
 
      02-18-2004

Anybody know how to do this "in the code behind the form"? We have a class defined to handle button mouseover behaviour and the like. We would like the ability to add the text alignment to the form. While editing the HTML does work, it would be easier if we did not have to edit every single button on the web page

Thanks

Timothy Swanso
----- Nakul wrote: ----

Hi

Try thi

<asp:Button id="Button1" runat="server" Text="Button" Width="256px
style="TEXT-ALIGN: left"></asp:Button

This align the text left for the butto

Thank
Naku



"DM" <danmorrissey-nos-pam-@cfl.rr.com> wrote in messag
news:..
> Is there any way to left align the text in a server control button
>>

 
Reply With Quote
 
Martin Dechev
Guest
Posts: n/a
 
      02-18-2004
Hi, Timothy Swanson,

You can create a style and then assign it to the buttons. something like
this:

<style type="text/css">
..leftAlign
{
text-align: left;
}
</style>

then assign it:

button1.CssClass = "leftAlign";
button2.CssClass = "leftAlign";
etc.

Documentation:
http://msdn.microsoft.com/library/en...classtopic.asp

Hope this helps
Martin
"tswanson" <> wrote in message
news:A82A6935-760C-4E34-BFF0-...
>
> Anybody know how to do this "in the code behind the form"? We have a

class defined to handle button mouseover behaviour and the like. We would
like the ability to add the text alignment to the form. While editing the
HTML does work, it would be easier if we did not have to edit every single
button on the web page.
>
> Thanks,
>
> Timothy Swanson
> ----- Nakul wrote: -----
>
> Hi,
>
> Try this
>
> <asp:Button id="Button1" runat="server" Text="Button" Width="256px"
> style="TEXT-ALIGN: left"></asp:Button>
>
> This align the text left for the button
>
> Thanks
> Nakul
>
>
>
> "DM" <danmorrissey-nos-pam-@cfl.rr.com> wrote in message
> news:...
> > Is there any way to left align the text in a server control button?
> >>



 
Reply With Quote
 
=?Utf-8?B?dHN3YW5zb24=?=
Guest
Posts: n/a
 
      02-19-2004
Thanks Martin

That is getting closer, but it still involves editing the HTML code
I have tried making definitions in Styles.css and they are all ignored

Are there any other ideas, or should I stick with what works

Thanks again
----- Martin Dechev wrote: ----

Hi, Timothy Swanson

You can create a style and then assign it to the buttons. something lik
this

<style type="text/css"
..leftAlig

text-align: left

</style

then assign it

button1.CssClass = "leftAlign"
button2.CssClass = "leftAlign"
etc

Documentation
http://msdn.microsoft.com/library/en...sclasstopic.as

Hope this help
Marti
"tswanson" <> wrote in messag
news:A82A6935-760C-4E34-BFF0-..
>> Anybody know how to do this "in the code behind the form"? We have

class defined to handle button mouseover behaviour and the like. We woul
like the ability to add the text alignment to the form. While editing th
HTML does work, it would be easier if we did not have to edit every singl
button on the web page
>> Thanks
>> Timothy Swanso

> ----- Nakul wrote: ----
>> Hi
>> Try thi
>><asp:Button id="Button1" runat="server" Text="Button" Width="256px

> style="TEXT-ALIGN: left"></asp:Button>>> This align the text left for the butto
>> Thank

> Naku
>>>> "DM" <danmorrissey-nos-pam-@cfl.rr.com> wrote in messag

> news:..
>> Is there any way to left align the text in a server control button
>>>

 
Reply With Quote
 
Chad Z. Hower aka Kudzu
Guest
Posts: n/a
 
      02-19-2004
"=?Utf-8?B?dHN3YW5zb24=?=" <> wrote in
news:C63FC1AE-79F8-4D93-9E09-:
> That is getting closer, but it still involves editing the HTML code.
> I have tried making definitions in Styles.css and they are all ignored.
>
> Are there any other ideas, or should I stick with what works?


Validate your CSS. When CSS is bad, you dont get errors. It just doesnt work.


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help on table align on left of page vs left hanging indent =?iso-8859-1?q?Jean-Fran=E7ois_Michaud?= XML 2 07-16-2007 11:46 AM
left align within centre align Paul Lautman HTML 3 03-03-2006 02:45 PM
How to set button text Align to left? boy0612 ASP .Net Building Controls 1 07-30-2004 07:13 PM
How to set button.text Align to left? boy0612 ASP .Net Web Controls 1 07-28-2004 11:11 PM
how to Align text left & vertical align middle Kay ASP .Net 2 07-25-2003 08:32 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57