I have an absolutely positioned input field on a form. The input field has a transparent background:
.form-page input[type="text"] { border: none; background-color: transparent; }
Surprisingly, I cannot select this input field by clicking on it in IE8. However, it works fine in Firefox. The same thing happens with background: none . When I change the background color:
background-color: red;
It works great, so this is a problem with the transparent background. Setting the border allows you to select an input field by clicking only on its border.
Is there a workaround to have an interactive input field with a transparent background working in IE8?
Update: Example. Uncomment background-color and the input field is selected. You can also click on the selection field and focus the input field by pressing Shift + Tab.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html><head></head><body> <style type="text/css"> input[type="text"] { border: none; background: transparent; } #elem528 { position:absolute; left:155px; top:164px; width:60px; height:20px; } #elem529 { position:absolute; left:218px; top:164px; width:40px; height:20px; } </style> <img src="xxx.png" alt="" width="1000" height="1000"> <input id="elem528" maxlength="7" type="text"> <select id="elem529"></select> </body></html>
html css internet-explorer internet-explorer-8 inputbox
Viliam Jan 20 2018-10-10T00: 00Z
source share