moon 111 Posted December 24, 2007 Share Posted December 24, 2007 In my website I set the bgcolor, text color etc. in css. It was white on a background of black. The problem is that when I view the page in my IE 7 the text feilds are mostly pink, yellow and green. The strange thing is that on some of the pages it's the wrong color and on others it's the correct one. I have some tool bars installed so it might be that. Oh, the reason I care is becuase it doesn't change the text color so it's very hard to read. Thanks, Moon 111 Link to comment https://forums.phpfreaks.com/topic/83026-pink-green-and-yellow-text-inputs/ Share on other sites More sharing options...
phpQuestioner Posted December 24, 2007 Share Posted December 24, 2007 I have no idea about the pink and green input background colors; but I pretty sure you are correct - it probably is your toolbars (unless your using a independent stylesheet/css style for each different browser type). Google toolbar automatically highlights commonly named fields - such as name, address, email, phone, and etc. - with a light yellow background color; too let you know you can auto fill the input fields with your saved info. Here is a javascript workaround for that: <script type="text/javascript"><!-- if(window.attachEvent) window.attachEvent("onload",setListeners); function setListeners(){ inputList = document.getElementsByTagName("INPUT"); for(i=0;i<inputList.length;i++){ inputList[i].attachEvent("onpropertychange",restoreStyles); inputList[i].style.backgroundColor = ""; } selectList = document.getElementsByTagName("SELECT"); for(i=0;i<selectList.length;i++){ selectList[i].attachEvent("onpropertychange",restoreStyles); selectList[i].style.backgroundColor = ""; } } function restoreStyles(){ if(event.srcElement.style.backgroundColor != "") event.srcElement.style.backgroundColor = ""; }//--> </script> Link to comment https://forums.phpfreaks.com/topic/83026-pink-green-and-yellow-text-inputs/#findComment-422311 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.