473,811 Members | 2,771 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Question: TextBox - Can't Align Center

I cant 'align center' a text box.

First of all, all the justifications (left, center, right) on the toolbar
are dimmed. Why?

Also, when I try to do it through HTML (wrapping the control in a <p
align="center"> <asp:TextBox ...></p>) this doesn't work either.

Any ideas?

Thanks.
Nov 17 '05 #1
3 2256
Do you want the text in the text box to be centered in the textbox? If so I
don't think HTML supports this.
<P align="center"> <asp:TextBox id="TextBox1"
runat="server"> </asp:TextBox></P>

This works for me.

Perhaps other areas on the page are throwing off the alignment?
"VB Programmer" <gr*********@ go-intech.com> wrote in message
news:eT******** ******@TK2MSFTN GP09.phx.gbl...
I cant 'align center' a text box.

First of all, all the justifications (left, center, right) on the toolbar
are dimmed. Why?

Also, when I try to do it through HTML (wrapping the control in a <p
align="center"> <asp:TextBox ...></p>) this doesn't work either.

Any ideas?

Thanks.

Nov 17 '05 #2
You can either give your textbox a CSS class:

// Class Method
..MyTextBox {
text-align: center;
}

Alternatively, you could simply apply the following style to the textbox:

MyTextBox.Attri butes.Add("styl e","text-align: center")

--
Tony Williams
www.bigtone.net

"Francis Shanahan" <fs@NoSpamToday Thanks.franciss hanahan.com> wrote in
message news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
Do you want the text in the text box to be centered in the textbox? If so I don't think HTML supports this.
<P align="center"> <asp:TextBox id="TextBox1"
runat="server"> </asp:TextBox></P>

This works for me.

Perhaps other areas on the page are throwing off the alignment?
"VB Programmer" <gr*********@ go-intech.com> wrote in message
news:eT******** ******@TK2MSFTN GP09.phx.gbl...
I cant 'align center' a text box.

First of all, all the justifications (left, center, right) on the toolbar are dimmed. Why?

Also, when I try to do it through HTML (wrapping the control in a <p
align="center"> <asp:TextBox ...></p>) this doesn't work either.

Any ideas?

Thanks.


Nov 17 '05 #3
I just highlight it like you would to a paragraph in MS word, the buttons
will become undimmed.
"VB Programmer" <gr*********@ go-intech.com> wrote in message
news:eT******** ******@TK2MSFTN GP09.phx.gbl...
I cant 'align center' a text box.

First of all, all the justifications (left, center, right) on the toolbar
are dimmed. Why?

Also, when I try to do it through HTML (wrapping the control in a <p
align="center"> <asp:TextBox ...></p>) this doesn't work either.

Any ideas?

Thanks.

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
6443
by: Michelle Keys | last post by:
I am trying to call a print function to print a string from a database using javascript. Which is RC_DATA of Varchar2(2500). This is a javascript is not being used. I have a thing that needs to be modified: if(e.CommandName =="Print") { string parsedreceipt = null; parsedreceipt = DecodeReceipt (e.Item.Cells.Text); Session = parsedreceipt;
0
1004
by: Logan McKinley | last post by:
I have a datalist that takes two clicks to show the SelectedItem or UpdateItem. The first click seems to fire the event but does not seem to change the page, the second click doesn't fire the event but changes the page. I have noticed people don't bind the data on post back but when i used if(!Page.IsPostBack) to only bind the date on the first load it seems to loose everything but the date of things that have been displayed with...
5
1736
by: hanolo | last post by:
Does anyone ever see this happen. I build a form with couple of textbox server control. When user inputs character ` in there, after form post back, the textbox become a line of string such as <INPUT id=_txtName style="WIDTH: 70%" value=` name=_txtName>. I can filter out ` from the inputs, but it seems like a microsoft bug to me.
0
2405
by: Jacob Donajkowski | last post by:
Once the user logs in I want to have the users switch from the Roster View to the Profile View and enter their profile infomation and save it. Then the next time they login and go to the Profile View I want the form populated from there profile on the sql server. The code to save the profile works fine. But when the user logs back in they data doesn't load back to the form. The multiview is located inside the LoginView's Logged-In View ....
0
3508
by: sjickells | last post by:
Hi I am having a problem using asp:TextBox's in a transparent table. I have a background image on the page and a table in the middle of the page. I have set the background colour of the table to white the used CSS to set the opacity to 90 so that you can see the background image through the table. The problem I am having is with the textboxes in the transparent
2
5080
by: sammiesue | last post by:
Hi, I have form with 2 autosummed textboxes ("total" and "casinototal"). I would like to have a grand total textbox ("grandtotal") get its value from summing "total" and "casinototal", but it doesn't seem to be working. Here is my code. Thanks for your help. -sammie <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Nursing Conference 2007 Registration Form</title>
7
3491
by: TechnoAtif | last post by:
Hi..There is again a similar problem..Now i;ve got the option values of list?menu box to show the textbox. If the option value of list is yes then the textbox is to be displayed . Can anyone help..through php or javascript. ONe more thing..How can i perform the same function for more than one such kind of problem..I mean if there is any other place in the form where i have to display textbox on selecting a particular value.how can it be...
0
2538
KalariaNitya
by: KalariaNitya | last post by:
Hello, could anybody help me? i have gridview, inside gridview i have one Update button & textbox update button update the quantity entered in textbox. i want to update the quantity on textbox on ENTER event. i had done below code: page_load()
2
7671
by: Ken Fine | last post by:
I want to add the security question and answer security feature to the ChangePassword control. I am aware that this functionality is built into the PasswordRecovery tool. I have implemented the PasswordRecovery with a Password reset required; a temporary password is sent to the account on file. I want an extra layer of security to accommodate the very unlikely contingency that someone's e-mail account is compromised. Challenging with the...
0
9728
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9605
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10648
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10389
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10135
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7670
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6890
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5554
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4339
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.