...

View Full Version : java help



KillaT2005
12-14-2006, 02:43 AM
i need to find a way to make the background of a text box transparent in Java, like so my background image shows through, not a white box

martin_narg
12-14-2006, 12:15 PM
Set the CSS style attribute of the input to "background: none;" as in this example
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Transparent Input</title>
<style type="text/css">
div {
background: url(http://www.codingforums.com/img/logo.gif) no-repeat;
width: 315px;
height: 64px;
}

form input {
margin-top: 40px;
background: none; /* this is the important bit */
}
</style>
</head>

<body>
<form name="frm" method="post" action="#">
<div>
<input type="text" name="txt" id="txt" />
</div>
</form>
</body>
</html>Hope this helps.

m_n

KillaT2005
12-14-2006, 12:19 PM
yeah i meant im writing a program in java and need to make a transperant text box

martin_narg
12-14-2006, 01:14 PM
This is a Javascript forum mate, not a Java forum - they are two different languages. You'd be better posting there to get an answer to your question.

m_n

nikkiH
12-14-2006, 02:06 PM
Also clarify what kind of textbox. AWT, Swing, etc.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum