colored text box

A

abracad_1999

I have created a very simple form
<form name="form1" method="post" action="" style="font-size:0.75em;">
e-mail <input type="text" name="textfield" size="15">
password <input type="password" name="textfield"
size="15">
<input type="submit" name="Submit" value="sign in">
</form>

But when I come to view it in a browser (IE6) thee-mail text box has
a
colored backround.


Any explanation, and how do i get rid of the color?
 
D

dorayme

I have created a very simple form
<form name="form1" method="post" action="" style="font-size:0.75em;">
e-mail <input type="text" name="textfield" size="15">
password <input type="password" name="textfield"
size="15">
<input type="submit" name="Submit" value="sign in">
</form>

But when I come to view it in a browser (IE6) thee-mail text box has
a
colored backround.


Any explanation, and how do i get rid of the color?

It is inheriting the background from somewhere else in your
code...

Try adding color: #000; background: #fff; to your style for
<form...>

Your code is only "good" under a transitional or older doctype
standard btw...
 
S

Steve Pugh

I have created a very simple form
<form name="form1" method="post" action="" style="font-size:0.75em;">
e-mail <input type="text" name="textfield" size="15">
password <input type="password" name="textfield"
size="15">
<input type="submit" name="Submit" value="sign in">
</form>

But when I come to view it in a browser (IE6) the e-mail text box has
a colored backround.

Any explanation, and how do i get rid of the color?

What colour? If yellow, then Google toolbar may be to blame.

Other than that, post a URL as we may need to see the full HTML and
the full CSS, plus the http headers sent from your server, etc.

Steve
 
J

Jukka K. Korpela

Scripsit dorayme:
It is inheriting the background from somewhere else in your
code...

Hardly. The background property is not inherited by default, and IE does not
recognize the keyword inherit.

But the question was multiposted, which means that we should probably ignore
it and the poster. Anyway, I suppose the question was solved in c.i.w.a.h
much better than the poster deserved.
 
D

dorayme

"Jukka K. Korpela said:
Scripsit dorayme:


Hardly. The background property is not inherited by default, and IE does not
recognize the keyword inherit.

I guess I was thinking that the form may have been part of
something has been styled for color and background. As in

css snippet:

div.high {color: #0f0; background: #f00;}

html snippet:

<div class="high">
<div><form...>...</form></div>
</div>

Perhaps I have mis-described my guess at a possibility to help
OP? The red bg appears in this form and it comes from div.high.
 
J

Jukka K. Korpela

Scripsit dorayme:
I guess I was thinking that the form may have been part of
something has been styled for color and background.

Even then, the background isn't inherited.
div.high {color: #0f0; background: #f00;}

html snippet:

<div class="high">
<div><form...>...</form></div>
</div>

That's possible of course - people suffering from divitis put all kinds of
div markup in their documents (instead of something simple like <form ...
class="high">). :)
The red bg appears in this form

The form element has transparent background by default, so the red
background would shine through, but that's not inheritance.

Form fields, on the other hand, typically have the background color set by
browser defaults ("browser style sheet", conceptually at least). It has been
white on all browsers I've used. Since the color property is (conceptually
at least) set for a form field element in a style sheet, inheritance never
takes place, except if you explicitly declare background: inherit (which
isn't supported by IE).
 
D

dorayme

"Jukka K. Korpela said:
The form element has transparent background by default, so the red
background would shine through, but that's not inheritance.

I was sloppy and I note and appreciate the correction...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top