Advertisement
milkdesu

html + instructions for searchbox

Jan 13th, 2014
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. 1. paste the script under <head>:
  2.  
  3. <script type="text/javascript" src="http://static.tumblr.com/p2evvtm/Wycm17d1m/tumblr_search_box.js"></script>
  4.  
  5.  
  6. 2. the css (for changing the appearance) of the search box, before </style> *if you need help, just contact me*:
  7.  
  8. #box {
  9. width: 158px;
  10. background: #fff;
  11. margin-top: 0px;
  12. margin-left: 0px;
  13. }
  14.  
  15. #search {
  16. border: 1px solid #000;
  17. position: fixed;
  18. width: 171px;
  19. height: 12px;
  20. font-size: 9px;
  21. padding: 2px;
  22. padding-left: 5px;
  23. color: #ddd;
  24. margin-left: -10px;
  25. margin-top: 70px;
  26. }
  27.  
  28. #button {
  29. position: fixed;
  30. margin-left: 153px;
  31. padding: 0px;
  32. margin-top: 71px;
  33. background: #eee;
  34. }
  35.  
  36.  
  37. 3. put this code in the html according where you want the searchbox to appear, after <body> *please only change what is in capitals*:
  38.  
  39. <div id="box">
  40. <form onsubmit="return tagSearch(this)">
  41. <input type="text" id="search" name="tag" value="TEXT GOES HERE" onfocus="if (this.value == '') {this.value=''}" onblur="if (this.value == '') {this.value=''}">
  42. <input type="image" id="button" src="IMG URL GOES HERE" value="Search">
  43. </form>
  44. </div>
  45. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement