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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transparent form element 1

Status
Not open for further replies.

TheConeHead

Programmer
Aug 14, 2002
2,106
US
Is there a way (oh and yes I searched first) to have a textfield or textarea given a transparent background but still have a solid border... I tried: opacity: .1; filter: alpha(opacity=10); but it made the whole thing transparent (including the border)

[conehead]
 
Perhaps I've misunderstood - this seems a very basic question. I've tested this in IE6 and FF1.5.

Code:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC
	"-//W3C//DTD XHTML 1.0 Strict//EN"
	"[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">[/URL]

<html>
    <head>
        <title>test</title>
        

        <style type="text/css">
			form {
				background-color: #aaa;
				padding: 20px;
			}
			[COLOR=blue]input.trans {
				background: none;
				border: 1px #000 solid;
			}[/color]
        
        </style>
    </head>

    <body>

		<form action="#">
			<label for="q">Search:</label>
			[COLOR=blue]<input name="q" id="q" class="trans" />[/color]
			<input type="submit" value="Go" />
		</form>
	</body>
</html>

---
Marcus
better questions get better answers - faq581-3339
accessible web design - zioncore.com
 
Sounds like you need a good readup on CSS - the W3C School's site do a good CSS tutorial.

You evidently use some of the more advanced features - such as opacity and (IE specific) filter - but may have missed out on some of the basics.

Anyway - happy to help, cheers for the
star.gif
!

---
Marcus
better questions get better answers - faq581-3339
accessible web design - zioncore.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top