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 8906345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:37:46+00:00 2026-06-15T02:37:46+00:00

I am trying to get on fields to have a border color around it

  • 0

I am trying to get on fields to have a border color around it when it is in focus and then to default back to its normal default border when it is no longer in focus

<p>
            <label for="username">
                <span>Enter Email</span>
                <input type="text" id="Text4" name="username" 
                    onfocus="this.style.borderColor='#00B4FF'" onblur="this.style.borderColor='#D9D9D9'"
                    class="semi-medium-text" /></label><span id="Span4"></span></p>

and other one is

<p>
            <label for="list">
                <span>My dropdwnn</span>
                <select id="Select9" class="semi-selction" maxlength="255" onfocus="this.style.borderColor='#00B4FF'"
                    onblur="this.style.borderColor='#D9D9D9">
                    <option value="">Select  Type</option>
                    <option value="1">A</option>
                    <option value="3">B</option>

                </select>
        </p>

CSS class that am using is

.semi-medium-text, #region-selector-div input {
border: 2px solid #D9D9D9;
border-radius: 5px 5px 5px 5px;
height: 25px;
padding: 5px;
vertical-align: middle;
width: 350px;
}

and class that are using for dropdown list is

.semi-selction {
border: 2px solid #D9D9D9;
border-radius: 5px 5px 5px 5px;
height: 37px;
padding: 5px;
vertical-align: middle;
width: 362px;
}

This correctly puts a border color around it when it is on focus/blur, but when it is no longer in focus/blur, border color remians same.. that is problem..
thanks in advance for suggestions

  • 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-06-15T02:37:47+00:00Added an answer on June 15, 2026 at 2:37 am

    You missed some quotes on your second block of code, that seems to be the problem:

    <select id="Select9" class="semi-selction" maxlength="255" onfocus="this.style.borderColor='#00B4FF'"
                    onblur="this.style.borderColor='#D9D9D9">
    

    Should be:

    <select id="Select9" class="semi-selction" maxlength="255" onfocus="this.style.borderColor='#00B4FF'"
                    onblur="this.style.borderColor='#D9D9D9'">
    

    I’ve tested it and it works a treat.

    Can I also recommend adding the style outline:none; to your select box? Chrome and I think Firefox puts an ugly box around <select>s by default and it would kind of ruin the affect your going for.

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

Sidebar

Related Questions

Introduction: I'm trying to get additional fields to log with log4j, and its working
I am trying to get this code to show only fields that have values,
I'm trying to get a garish red border around some radio buttons, but it
I have been trying to get a custom Value from the Custom Field that
I am trying to get what all fields(input,select) are changed during keyup and change
I am trying to get the value of the text in the input fields.
I'm trying to get my name and trip input fields to line, but they're
I am trying to get jquery validate to work on multiple fields. Reason being
I am trying to get all the fields in an object to comeup in
I have a form where fields get added via JavaScript. This is fairly easy

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.