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

  • SEARCH
  • Home
  • 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 230795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:52:46+00:00 2026-05-11T19:52:46+00:00

I have the following CSS which isn’t working in IE7. input:focus{border-width: 2px;border-color: Blue; border-style:

  • 0

I have the following CSS which isn’t working in IE7.

input:focus{border-width: 2px;border-color: Blue; border-style: solid;}

Basically, I just want to set the border attributes when the input is focused. Works in Firefox etc… If anyone could explain why it isn’t working in IE 7 and suggest a possible workaround it would be appreciated. Thanks.

  • 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-11T19:52:46+00:00Added an answer on May 11, 2026 at 7:52 pm

    A known answer for this problem is using the following code:

        sfFocus = function() {
        var sfEls = document.getElementsByTagName("INPUT");
        for (var i=0; i<sfEls.length; i++) {
            sfEls[i].onfocus=function() {
                this.className+=" sffocus";
            }
            sfEls[i].onblur=function() {
                this.className=this.className.replace(new RegExp(" sffocus\\b"), "");
            }
        }}
    if (window.attachEvent) window.attachEvent("onload", sfFocus);
    

    And here is the css style

    input:focus, input.sffocus{background-color:#DEEFFF;}
    

    The problem is that IE doesn’t recognise that style at all.

    EDIT: You can find a solution using prototype here: http://codesnippets.joyent.com/posts/show/1837

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

Sidebar

Related Questions

I have the following code in my CSS file, which isn't working. #home table
I have a submit button which has the following CSS: .button{ border:1px solid #015691;
On my web site, I have the following CSS: a:hover{color:red;border-bottom:1px solid} This displays a
I have the following code var input = $('#el_id'); wrapper = $(document.createElement('div')); wrapper.addClass('small'); wrapper.css('width',200);
I currently have the following CSS for my 4 columns which might grow to
I have the following css code: #Layer3 { position:absolute; width: 89%; height: 40%; left:
I have an image (base.jpg) which has the following css: .thumb-image { padding: 0;
I have the following less.css ( http://lesscss.org/ ): #content { overflow: hidden; width: 100%;
I have the following css from another question: .title {color:#707070;} .username {color:#8DAAB8;} .dateandtime {color:#A5A7AC;}
I have an iframe which is showing google map following css is applied on

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.