Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

textfield style 1

Status
Not open for further replies.

TheConeHead

Programmer
Aug 14, 2002
2,106
US
Can I make the bg of a textfield either completely transparent or just not there at all?

[conehead]
 
Code:
<input type="text" name="t" style="background-color: transparent;" />

It takes the background color of the body, not of its parent element.

*cLFlaVA
----------------------------
[tt]insert funny quotation here.[/tt]
 

cLFlaVA said:
It takes the background color of the body, not of its parent element.

Not so - take the following example:

Code:
<html>
<body style="background-color: green;">
	<form>
		<div style="background-color: red;">
			<input type="text" name="t" style="background-color: transparent;" />
		</div>
	</form>
</body>
</html>

The input box background is red, not green. It may well be that if the parent element has no bgcolor specified, it will use the bgcolor of the nearest parent that does have one - which will normally be the body.

Hope this helps,
Dan

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top