473,657 Members | 2,475 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can you change the background of an input textbox?

Hi,

I have an html page that asks the user for info, preforms a
calculation and then displays the output in a read only text box. The
problem is that I have a grey background for the page, but the number
shows up in the textbox with a white background. I wanted to know if
there was any way to change this background. If not is there anyway I
can write out text from an onclick event without reloading the page or
using a text box.

Thanks for any help!
Barb
Jul 20 '05 #1
1 9871
bbwrede wrote:
I have an html page that asks the user for info, preforms a
calculation and then displays the output in a read only text box. The
problem is that I have a grey background for the page, but the number
shows up in the textbox with a white background. I wanted to know if
there was any way to change this background.


Same as any other element - the CSS background-color property.

Tutorials etc: http://dorward.me.uk/www/css/
Questions on the subject: news://comp.infosystems.www.authoring.stylesheets

--
David Dorward http://dorward.me.uk/
Jul 20 '05 #2

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

Similar topics

1
3174
by: thilo | last post by:
hi ng! i need to change the (inline) style-setting - ie the "style=" attribute - for an html-<input> by client-side script, according to the "value" of another <input>. i declared it like that in the html-body: <input name="enter"><br> .... <input name="targetField" style="background-color:#ffffff" value="Some
5
27008
by: AFN | last post by:
I'm trying to set a submit button to change text and color when clicked. Like saying "please wait" instead of "submit" and then changing the background color and text color. All works, except for changing the text color. I can set style.background='red' to change the background color to red. But if I say style.color='green' to change the text color, it does not change. How do you change the text color on a button when it is clicked?
3
8802
by: Roberto Castro | last post by:
Hello! I have been assigned for the first time an adp Access project and so far I have managed to make the changes needed for some requirements. However, I am struggling to find the place where the application changes the color of the background of a textbox. Here the explanation goes: This is a form bound to an SQL view. The detail section has several fields, one of them being a textbox of name "Type". I checked its
3
3622
by: A.M | last post by:
Hi, Even I specifically mentioned "white" as background color of all ASP:TextBoxes of my form, Some of them come up with yellow background. I guess it should be kind of ASP.NET behaviour, but I don't know what exactly it means. What is the meaning of that yellow BG color of ASP:TextBoxes ? How can I have control over it?
0
1082
by: Wayne Wengert | last post by:
I have a form on which I change background colors when textbox get focus and I reset the background color when it loses focus. This works fine except when I change the focus via code. If I validate the contents of several textbox values from a subroutine and find txtBox3 has invalid contents I display an error msg and then issue txtBox3.Focus and exit the sub the cursor is in txtBox3 but the background color of the last textbox into which...
2
1084
by: Bob Hollness | last post by:
OK. I want to use a transparent control to display text on an image. I also want it to allow user input and editing. See as textboxes cannot be transparent (or can they.....?) is there anyway I can set a label control to allow user input? Thanks -- I'll have a B please Bob.
3
3187
by: bulwark_jrm | last post by:
I'm trying to duplicate functionality found in a Windows application at one of my clients. Essentially, another programmer was able to arrange a lot of search options into a single dialog box by positioning the descriptive label behind the textbox instead of beside it. When the user enters text, the label disappears and the user types in their information into the textbox. I've figured out how to arrange a label behind the textbox...
3
17322
by: Bundy | last post by:
Hi How do I change the background colour of an input box in a form as soon as the value is changed? Also the background should revert back to it's original colour if the user decides that they do not want to make any changes and hence retype back the orginial value. I do not want the background to change after the user has moved to the next form field but as soon as the value has been changed.
3
2411
by: helraizer1 | last post by:
Hi all, On one page of my site I have a form (code below) with an input textbox with the id "message". You type in your message in this field (as the id suggests) and depending on an option in a select element (still part of the form) the text of 'message box' changes to that colour. form: <form id="input" method="post" action="<?php echo $PHP_SELF; ?>"> Name: <input id="username" type="text" name="username"...
0
8411
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
8323
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
8739
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...
1
8513
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8613
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...
0
5638
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
4173
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
2740
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
2
1732
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.