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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:54:26+00:00 2026-05-26T11:54:26+00:00

I’m trying to create an expandable search bar; like www.apple.com uses. (Or I guess

  • 0

I’m trying to create an expandable search bar; like http://www.apple.com uses. (Or I guess previously had up)

I’ve been trying to work with this code;

http://www.cibgraphics.com/blog/article/create_an_expandable_search_form

I currently have all that code via the tutorial plugged into my test site – and it’s not appearing. Can anyone help me figure out why? Test site located at; http://www.o s m p r o d u c t i o n.com

Also, once I get this implemented; I’d like to figure out how to add the nice transition similar to what apple has in the expandable, rather then the clunky one the code in the above links has. So I guess the sub-question would be; how could I implement a smoother transition to the animation of the search bar becoming larger?

I’m pretty much using exactly what’s inside the code of that link; but it’s also below.

Mark-Up:

<section>
    <form class="search_form">
        <input type="search" class="searchinput" placeholder="Search"/>
        <input type="submit" value="Search" class="searchsubmit"/>
    </form>
    <div class="clear"></div>
</section> 

CSS:

<!--Styles for Search Bah-->

.clear {
    clear: both;
}  

.search_form {
    background: #fff;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    -o-border-radius: 8px;
    -ms-border-radius: 8px;
    border-radius: 8px;
    border: 1px solid #d6d6d6;
    padding: 3px;
    padding-left: 8px;
    -webkit-box-shadow: inset 0 2px 2px rgba(0,0,0,.3);
    -moz-box-shadow: inset 0 2px 2px rgba(0,0,0,.3);
    -o-box-shadow: inset 0 2px 2px rgba(0,0,0,.3);
    -ms-box-shadow: inset 0 2px 2px rgba(0,0,0,.3);
    box-shadow: inset 0 2px 2px rgba(0,0,0,.3);
    float: left;
}  


.searchsubmit {
    display: block;
    height: 23px;
    width: 23px;
    line-height: 29px;
    background: url('../images/searchicon.png') no-repeat 3px 4px;
    text-indent: -9999px;
    border: none;
    vertical-align: middle;
    float: right;
}  

.searchinput {
    width: 200px;
    font-size: 13px;
    color: #999;
    background: #fff;
    vertical-align: middle;
    margin-top: 4px;
    border: none;
    float: left;
    outline: none;
}  

.searchinput:focus {
    width: 400px;
}  

.searchinput {
    width: 200px;
    font-size: 13px;
    color: #999;
    background: #fff;
    vertical-align: middle;
    margin-top: 4px;
    border: none;
    float: left;
    outline: none;
    -moz-transition: all 0.3s linear;
    -webkit-transition: all 0.3s linear;
    -o-transition: all 0.3s linear;
    -ms-transition: all 0.3s linear;
    transition: all 0.3s linear;
}  

::-webkit-search-decoration
{
    display: none;
}

input[type=search]{
    -webkit-appearance:textfield;
    -webkit-box-sizing:content-box;
}  

And I guess lastly; How can I tie the functionality, of a working ‘Search form’ with my new one I’m currently using? Would a quick way be; somehow tying the ‘standard WP search box’ with my new one I created? Either customize it to look like my new one, or define my new one with it’s functionalities and hide the previous one?

Update: I have the search bar setup basically in my test site at the top right of the screen; but now the ‘search button’ that I’m calling isn’t appearing to the right of it as it should. And I’m stuck with figuring out how to tie the functionality of a standard WP working search form with it.

Here is the PHP mark-up of the standard WP functional Search bar that came with the theme; I think I just need to migrate/integrate the styles and scripts via my new ‘Search Bar’, but now – how?

<ul>
<!-- <div align="center"> -->
<form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">
        <!-- <input type="text" value="<?php the_search_query(); ?>" name="s" id="s" size="20" /> -->
        <input type="text" value="<?php _e('Search','emerald_stretch'); ?>" name="s" id="s" size="20" onfocus="if (this.value == '<?php _e('Search','emerald_stretch'); ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e('Search','emerald_stretch'); ?>';}" />
        <input type="submit" id="searchsubmit" value="<?php _e('Find','emerald_stretch'); ?>" />
</form>
<!-- </div> -->
</ul>

I just attempted to add the new styles and appearance of the new one I created by adding the classes; and now it appears in place of the old WP one – but on focus it disappears?

<ul>
<!-- <div align="center"> -->
<form method="get" class="search_form" action="<?php bloginfo('home'); ?>/">
        <!-- <input type="text" value="<?php the_search_query(); ?>" name="s" id="s" size="20" /> -->
        <input type="text" class="searchinput" value="<?php _e('Search','emerald_stretch'); ?>" name="s" id="s" size="20" onfocus="if (this.value == '<?php _e('Search','emerald_stretch'); ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e('Search','emerald_stretch'); ?>';}" />
        <input type="submit" class="searchsubmit" id="searchsubmit" value="<?php _e('Find','emerald_stretch'); ?>" />
</form>
<!-- </div> -->
</ul>
  • 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-26T11:54:27+00:00Added an answer on May 26, 2026 at 11:54 am

    Your search box is working fine by the looks of it. Look at the very bottom left hand corner of your site. If your’re trying to get the green search box on the upper right hand corner of your site to reflect this type of animation, then you need to properly reference the CSS you have specified.

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

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I am trying to render a haml file in a javascript response like so:
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to create an if statement in PHP that prevents a single post
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to understand how to use SyndicationItem to display feed which is
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
link Im having trouble converting the html entites into html characters, (&# 8217;) i

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.