Search button shadow

Zipotontic

I just made my search button/icon clickable by adding a transparent button onto the input field. Not sure this is the right way to go about it but I couldn't think of anything else outside of jQuery/javascript which I'm not very experienced with. Seems to work fine except the hidden button isn't totally hidden... I've made the background transparent and said border: none but I can see a little shadow of it. See screenshot below and put on some glasses because it's barely noticeable. Still bugs me very much. I've looked through my stylesheet and can't find any shadow setting for inputs so unsure how to fix this.

enter image description here

HTML:

<div id="SearchForm" style="width: 120px; height: 29px; position: relative; top: 16px; right: 17px; padding-left: 20px;">
<form action="%%GLOBAL_ShopPath%%/search.php" method="get" onsubmit="return check_small_search_form()">            
    <span class="add-on" style="position: absolute; top: 6px; right: 4px;"><i class="icon-search"></i></span>          
    <input type="text" class="input-small" name="search_query" id="search_query" placeholder="Search..." value="%%GLOBAL_OriginalSearchQuery%%" title="Search" />
    <input type="submit" value="" name="Search" title="Search" style="position: absolute; top: 2px; right: 0; background: transparent; border: none; width: 35px; height: 22px;" />       
</form>       
</div>

CSS:

    input[type="submit"] {
      cursor: pointer;
      -webkit-appearance:none;

}

Afzaal Ahmad Zeeshan

That is I guess border-top of the button, or the button is not totally hidden. So you can try this out:

<input type="submit" />

And then use CSS to change the image, to the background-image for the submit button. So when you will click the form will be submitted!

input[type="submit"] {
  /* here, you can change the background-image
   * background-image: url('../link/to/file.png');
   */
}

If you really wanna get rid of it, then remove the above image, and use it as the background-image of the button. This way you won't have to worry about the button.

You can hide the button using:

input[type="submit"] {
 opacity:0.0; 
 filter:alpha(opacity=00); // for ie..
}

Also, if you provided a link to the website then we might have noticed what was causing the issue, or just the source code.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related