HTML Code ClinicDo you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
I would like to change the color of just the text 'Loading complete, begin testing now...' and 'Data Loading, Please Wait. . .'
How do I change it to red?
You can use CSS and some JavaScript to accomplish that. First, set the waiting text color and background color using CSS. Then, from the onload tag, have some JavaScript change the colors again:
(Note, all the stuff on the <body> tag should be on one line.
It may be easier to move the JavaScript to a separate function, so you're not cluttering up the <body> tag too much, but I'll leave that up to you.
The code in the onload event changes the color (of the text) and the background color properties of the style object. This style object belongs, in this example, to the text box.
HtH,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Hi Imar,
Sorry I didn't get back to you until now to thank you for helping me with this text box color problem. What you posted was exactly what I needed :) Thanks alot!
One more thing on this same script, how would change the size of the height of the text box? I can change the width with the script I have, but how would I code it to also change the width?
Thanks again for all your help - Happy Holidays and an even better New Year!
Larry
---------------------------------------------
Quote:
quote:Originally posted by Imar
Hi Larry,
You can use CSS and some JavaScript to accomplish that. First, set the waiting text color and background color using CSS. Then, from the onload tag, have some JavaScript change the colors again:
(Note, all the stuff on the <body> tag should be on one line.
It may be easier to move the JavaScript to a separate function, so you're not cluttering up the <body> tag too much, but I'll leave that up to you.
The code in the onload event changes the color (of the text) and the background color properties of the style object. This style object belongs, in this example, to the text box.
HtH,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Well, it's almost the same as with the colors. Just set the relevant style (height, in this case) and use JavaScript to change it. Changes are in bold:
With your help, everything is working just the way I wanted :D
Larry
---------------------------------------------
Quote:
quote:Originally posted by Imar
Well, it's almost the same as with the colors. Just set the relevant style (height, in this case) and use JavaScript to change it. Changes are in bold:
hi Imar,
I wanted to chage the colour of combo box, is it possible,
i try to use style, but it is changing background colur, i want to chage the arrow colour text colour,
waiting for your help