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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T23:58:26+00:00 2026-06-07T23:58:26+00:00

trying to make an input box do the following: normal sate the input box

  • 0

trying to make an input box do the following: normal sate the input box text is x, hover state the input text is y and was you leave the box its z and can stay z through all states again.

-update
have a search box which the background image and text are faded out, once you hover it is is vivid, once you focus it, it is vivid with a 2px border, but once you leave it i loose verything:( so need a trick to get it to stay vivid the background picture (of which there are x and y, one for each state) and the text but loose the 2px border

---UPDATE ---
/* Search box */
.searchbox {
    background: url(../images/search-grey.gif) no-repeat 6px -5px #f8f8f8;
    width:240px; 
    margin-right:4px; 
    margin-left:11px; 
    color:#cccccc;   
    vertical-align: top; 
    padding: 4px 2px 4px 79px;
    border-color: #4FA4F9;
}
.searchbox:hover {
    background: url(../images/search-greyb.gif) no-repeat 6px -5px #f8f8f8;
    color:#888888; 
}
.searchbox:focus {
    background: url(../images/search-greyb.gif) no-repeat 5px -6px #ffffff;
    width:239px; 
    color:#888888; 
    padding: 3px 2px 3px 78px;
}
.searchbox.blur {
    background: url(../images/search-greyb.gif) no-repeat 6px -5px #ffffff;
    width:239px; 
    color:#000000; 
    padding: 4px 2px 4px 79px;
}

@-moz-document url-prefix() {
    .searchbox {
    background: url(../images/search-grey.gif) no-repeat 6px -4px #f8f8f8;
    }
}
@-moz-document url-prefix() {
    .searchbox:hover {
    background: url(../images/search-greyb.gif) no-repeat 6px -4px #f8f8f8;
        }
}
@-moz-document url-prefix() {
    .searchbox:focus {
    background: url(../images/search-greyb.gif) no-repeat 5px -5px #f8f8f8;
    }
}

input::-moz-focus-inner /*Remove button padding in FF*/
{ 
    border: 0;
    padding: 0;
}
input, select, textarea {
  margin: 1 0 0;
}
input, textarea, .date {
  border: 1px solid #aaa;
  border-radius: 3px;
  color:#333;
}
input {
  font-size: 13px;
  padding: 0px;
}
textarea {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  padding: 4px 4px 4px 4px;
}

select:hover {border: 1px solid #4FA4F9;}
input:hover {border: 1px solid #4FA4F9;}
textarea:hover {border: 1px solid #4FA4F9;}
select:focus {padding: 0px;}
input:focus {padding: 0px;}
textarea:focus {padding: 3px 3px 3px 3px;

}

— html —

<input id="searchdomain" name='domain' type="text" style="font-size:15px;" class="searchbox"/>

—js—-

/* Search Box Leave */
$(".searchbox").blur(function(){
    $(this).addClass("blur");
});
  • 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-07T23:58:28+00:00Added an answer on June 7, 2026 at 11:58 pm

    You could do this using jQuery by setting a class.

    $(".searchable").blur(function() {
        $(this).addClass("blur");
    });
    

    Then in your css you can set the color like this

    .searchable.blur
    {
      color:#000;   
    }
    

    ​
    Here is a jsfiddle example -> http://jsfiddle.net/y46Wk/2/

    Just bear in mind that the element won’t show its hover color again unless you remove the class.

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

Sidebar

Related Questions

how can I make a text box or any input form parse html? Im
I'm trying to make the input box (on the JSFiddle attached) with the serialize
I am trying to make an input box where the input box gets empty
I am trying to make a button to add another input box every time
I'm trying to make a small username and password input box. I would like
i am trying to make a text box no editable for the users. I
http://jsfiddle.net/mretchin/JEVuX/40/ That's my code. I'm trying to make an input box that takes a
I am trying to make a radio input checked. Neither of the following works:
I'm trying to make the following sign up box fluid responsive in CSS. Here
I'm trying to make a simple search box. How can I trigger a function

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.