Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5952743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:43:29+00:00 2026-05-22T17:43:29+00:00

I have an input box that is part of my log in functionality. I

  • 0

I have an input box that is part of my log in functionality. I am displaying an image in css and onclick on the box (:active), the image disappears allowing the user to type in the information. The reason I am using an image is because of the text password displaying *.

This works fine in all browsers except IE. Can anyone help.

HTML:

<form class="additemsignupformlivregister">
  <div class="logininputdiv">
    <input type="text" class="filterinput clearField">
  </div>
  <div class="logininputdiv">
     <input type="password" class="filterinputpassword clearField">
  </div>
 </form>

Here is the CSS:

.filterinput {
-moz-border-radius:3px;
border-radius:3px;
-webkit-border-radius:3px;
border: 1px solid #D0D0D0;
box-shadow: 0 0 2px #9B9B9C inset;
color: #9b9b9c;
font-family: arial;
font-size: 12px;
height: 30px;
line-height: 30px;
margin-bottom: 10px;
margin-left: -3px;
padding-left: 5px;
padding-right: 10px;
width: 170px;
background-image: url("../images/enteremail.png");
background-repeat: no-repeat;
}

Again, onclick on the input field the image disappears in Firefox, Chrome, and Safari but not IE. Thanks.

.filterinput:focus{
box-shadow:0 0 2px #000000 inset;
-moz-box-shadow:0 0 2px #000000 inset;
-webkit-box-shadow:0 0 2px #000000 inset;
color: #000000;
background: none;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T17:43:30+00:00Added an answer on May 22, 2026 at 5:43 pm

    IE 5.5, 6, and 7 do not support the :focus css selector

    http://reference.sitepoint.com/css/pseudoclass-focus

    Add an id to your password input

    <input id="password" type="password" class="filterinputpassword clearField">
    

    Add this in your head tag

    <!--[if lte IE 7]>
    <script type="text/javascript">
        var password = document.getElementById("password");
        var defaultClasses = this.className;
        password.onfocus = function () {
            this.className = defaultClasses + " focus";
        }
        password.onblur = function () {
            this.className = defaultClasses;
        }
    </script>
    <![endif]-->
    

    And this to your CSS:

    .filterinput:focus, .filterinput.focus { /* same as before */ }
    

    Using jQuery you would only need to do this:

    <!--[if lte IE 7]>
    <script type="text/javascript">
        $(function(){
            $("input:password").bind("focus blur", function() { 
                $(this).toggleClass("focus"); 
            });
        });
    </script>
    <![endif]-->
    

    Only wrapped that so that other browsers that work properly don’t have this overhead.

    You will still need the css .filterinput.focus class defined.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an input box that that is part of a form . depending
I have an input box that takes values from 0-100. I want to prevent
In my ASP.NET page, I have an input box that has to have the
I have a string value from a user input box. I have to figure
I have a search input box that appears upon rollover of a button. Rather
I have a form with one text box that is part of a div
I have written a user control that contains a text box and a button.
I have in input box that can only contain numerical values (with use of
I have a web app that needs both functionality and performance tested, and part
I have a form with an input box where the user can specify their

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.