I have a text field and I dont want to show border around it as it is a read-only text field. How can I make it to appear without the border and without the background color?
+3
A:
since you did not give any information about the css version, here's an example:
<style type="text/css">
input[type=text]
{
border: 0px;
background: transparent;
}
</style>
<input type="text" value="helllo" />
Andreas Niedermair
2010-07-13 16:24:04
+2
A:
#your_text_field {
border-style: none;
background-color: transparent;
}
Edit: Oh well, what do you know, transparent
actually works on IE6. I remember it not working for certain attributes, such as border
.
casablanca
2010-07-13 16:25:07
+1
A:
Tried something along the lines of:
<input class="noBorderAndBackground" type="text" />
noBorderAndBackground{
background-color:white;
border-style:none;
}
Jason B-H
2010-07-13 16:26:35
+2
A:
<html>
<head>
<style type="text/css">
input.asLabel
{
border: none;
background: transparent;
}
</style>
</head>
<body>
<form>
<input class="asLabel" type="text" value="See, don't touch :)" disabled/>
</form>
</body>
</html>
ttchong
2010-07-13 16:48:01