I have an absolutely positioned input box in a form. The input box has transparent background:
.form-page input[type=
You have to define a (transparent) background image.
Just in case someone would be interested. One of suggested workarounds....
As bobince observed, it's an IE7 bug. I've sometimes found it convenient to solve it by adding a value=" "
. Use as many non-breaking spaces as required to make the clickable area big enough. Depending on your app, you might need to strip these later.
I am unable to reproduce such a problem in IE8. Full test case? Are you sure there's not a layering problem causing some other transparent element to cover the clickable area?
Does setting background-image
make a difference? What about to a transparent GIF?
ETA: Curious! It's actually an IE7 bug. For me, your example exhibits the described behaviour in IE7, but in IE8 it's only when in EmulateIE7 mode; in IE8 native rendering it's fixed. You'll generally want to make sure you don't fall back to IE7 rendering by using a suitable X-UA-Compatible
header/meta; however, yes, setting the background-image
to a transparent GIF fixed the problem for me. Tsk, we still need the blank GIF even in this day and age, huh?
Please include the html for the input element.
How did you define the input element? The code below works in IE8 (IE 8.0.7600 Windows). I tried this in IE8 and was able to 'select' the input area just fine.
<html>
<head>
<style>
.form-page input[type="text"] {
border: none;
background-color: transparent;
/* Other stuff: font-weight, font-size */
}
</style>
</head>
<body>
<input type="text" name="test" value="test" id="test"/>
</body>
</html>
I've found the same issue using IE10 on Windows 7. Both of the following methods fixed the issue for me.
Franky's method using a transparent background image...
background:url(/images/transparent.gif);
Sketchfemme's method using an rgba background colour with '0' opacity
background-color:rgba(0,0,0,0);
Jim Jeffers suggestion for editing the z-index's did not work for me.
It seems though that even with the transparent gif trick, if you set background: transparent anywhere else in your CSS, for actual web browsers, it triggers the IE7 bug and you don't get a cursor on hover and can't easily click into the input box.