Advertisement
ireallywantagf

Searchbar Tutorial

Feb 10th, 2018
322
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. Paste the line below beside the other <meta name> tags:
  2. <meta name="color:search border" content="#000">
  3.  
  4. Paste the CSS code below in your CSS section:
  5. .search {
  6. width:70px;
  7. padding:7px;
  8. margin-top:10px;
  9. border-radius:4px;
  10. background:{color:bg};
  11. font-size:12px;
  12. color:{color:text};
  13. border:4px double {color:search border};
  14. font-family:ms gothic;
  15. }
  16.  
  17. ::placeholder{
  18. color:{color:text};
  19. }
  20.  
  21. .go {width:46px; height:34px; background:{color:bg};
  22. border-radius:4px;font-size:12px; font-family:{text:font};color:{color:text};
  23.  
  24. border-top:2px solid rgba({RGBcolor:search border}, 0.3);
  25. border-left:2px solid rgba({RGBcolor:search border}, 0.3);
  26. border-bottom:2px solid rgba({RGBcolor:search border}, 1.0);
  27. border-right:2px solid rgba({RGBcolor:search border}, 1.0);
  28. outline:none;font-family:ms gothic;}
  29.  
  30. .go:active{
  31. border-bottom:2px solid rgba({RGBcolor:search border}, 0.3);
  32. border-right:2px solid rgba({RGBcolor:search border}, 0.3);
  33. border-top:2px solid rgba({RGBcolor:search border}, 1.0);
  34. border-left:2px solid rgba({RGBcolor:search border}, 1.0);
  35. outline:none;}
  36.  
  37. .go:hover{
  38. cursor: help;
  39. }
  40.  
  41. Paste this code somewhere under the <body> section (it tends to look best in the sidebar):
  42. <form action="/search" method="get">
  43. <input class="search" type="text" placeholder="{lang:Search}..." name="q" value="" style="outline:none;">
  44. <input class="go" type="submit" value="GO!" id="sb"/>
  45. </form>
  46.  
  47. Feel free to edit the {lang:Search} to change the placeholder text in the searchbar before it's selected. You can also edit the "GO!" section as well. Besides that, if you do not have any prior knowledge to coding (especially with input forms), it's best not to edit anything else!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement