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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:38:02+00:00 2026-06-17T15:38:02+00:00

I currently have a contact form on my site that when clicked highlights the

  • 0

I currently have a contact form on my site that when clicked highlights the border in Orange.

There are icons in the fields that are grey at the moment ( see Here for print screen: http://i47.tinypic.com/2d6mvwp.jpg), I’m trying to get it so that when a field is clicked the image changes from the grey to an orange version. So essentially the field icon and the borders highlight at the same time depending on which one is clicked.

I’m hoping this is dead simple for someone, i think the main thing im struggling with is that the images are referenced through CSS

HTML part of the form is here:

    <form method="post" action="contactengine.php">

            <label for="Name"></label>
            <input type="text" placeholder="Name" name="Name" id="Name" 


            <label for="Email"></label>
            <input type="text" placeholder="E-mail" name="Email" id="Email" />

            <label for="Message"></label><br />
            <textarea name="Message" placeholder="Enter your message here..." rows="20" cols="20"></textarea>

            <input type="image" name="submit" value="" src="Button_Static.png" onmouseover="this.src='Button_Hover.png'" onmouseout="this.src='Button_Static.png'" class="submit-button"/>

        </form>

and the CSS behind the name and email fields is here (apologies the codeblock wasn’t enabling me to insert this correctly):

#Name{
    background-image: url(NameIcon.png);
    background-repeat: no-repeat;
    background-size:32px 24px;
    background-position-x: 10px;
    background-position-y: 40%;
    padding: 5px;
    height: 30px;
    width: 350px;
    font-family: Helvetica, sans-serif;
    font-size: .8em;
    margin: 0px 0px 10px 0px;
    border: 2pt solid #ccc;
    text-indent: 50px;

    /* Curved Boxes - Browser Compatability */

    -moz-border-top-left-radius: 8px;
    border-top-left-radius: 8px;
    -moz-border-top-right-radius: 8px;
    border-top-right-radius: 8px;
    -moz-border-bottom-left-radius: 8px;
    border-bottom-left-radius: 8px;
    -moz-border-bottom-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

#Email {
    background-image: url(EmailIcon.png);
    background-repeat: no-repeat;
    background-size:30px 17px;
    background-position-x: 12px;
    background-position-y: 40%;
    padding: 5px;
    height: 30px;
    width: 350px;
    font-family: Helvetica, sans-serif;
    font-size: .8em;
    margin: 0px 0px 10px 0px;
    border: 2pt solid #ccc;
    text-indent: 50px;

    /*Curved text Boxes - Browser Compatability*/

    -moz-border-top-left-radius: 8px;
    border-top-left-radius: 8px;
    -moz-border-top-right-radius: 8px;
    border-top-right-radius: 8px;
    -moz-border-bottom-left-radius: 8px;
    border-bottom-left-radius: 8px;
    -moz-border-bottom-right-radius: 8px;
    border-bottom-right-radius: 8px;
}
  • 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-17T15:38:03+00:00Added an answer on June 17, 2026 at 3:38 pm

    Do another CSS style and use :focus that will apply to input elements with focus. Just change the image and border in there to the orange ones:

    #Name:focus{
        background-image: url(OrangeIcon.png);
        border: 1px solid orange
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have an AJAX contact form that currently on submission emails form data to
I have a simple contact form that works in every browser, except IE. It
Checking through my contact form I have found Cross Site Scripting vulnerabilities but haven't
I have been working on a contact form that allows multiple file attachments using
Currently I have some kind of contact form in my Android application. I am
I have a contact form at my wordpress site, which it's data to mysql
I have this site and I try to add a contact form in jQuery
The basics: I have a contact form that uses php to validate the forms.
So I currently have this code: (ns contact-form.core (:gen-class)) (def foo Hello World!) (defn
Currently have a drop down menu that is activated on a hover (from display:none

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.