Skip to content

ThirteeNov

My personal blog about coding and internet

Menu
  • About me
  • About Zofia Kreasi
  • Cart
  • Checkout
  • Making an airplane game from scratch in Unity
  • My account
  • Privacy Policy
  • Privacy Policy – zkLeaderboard
  • Sample Page
  • Shop
  • Tutorials on Learning JavaScript
  • ZKAccounts – Privacy Policy
Menu

How to create an HTML input box with search icon inside it?

Posted on April 23, 2018August 4, 2020 by Habibie

We can make an interesting search input by styling it with css, by adding search icon like what we see in this image:

Here is HTML script, input tag with an id:

<input type="text" id="searchinput">

And this is CSS part:

#searchinput {
	background-image: url('search.png');
	background-size: 30px 30px;
	background-position: 5px 5px;
	background-repeat: no-repeat;
	width: 100%;
	padding: 12px 20px 12px 40px;
	border: 1px solid #ddd;
	border-radius: 10px;
}

Don’t forget to place your search.png icon file on your directory.

Post Views: 338
ciihuy2020

Welcome!

  • My YouTube Channel
  • My GitHub Page
  • About me

Categories

  • 3DVista
  • Android
  • Apache
  • C#
  • Cordova
  • Electron & Node JS
  • HTML5, CSS & JavaScript
  • iOS
  • Let's Make Unity Games
  • Misc
  • Photoshop
  • PHP
  • Python
  • Uncategorized
  • Unity
  • WordPress

Recent Posts

  • Hover Reveal script for Unity to show and hide object on mouse hover
  • How to Prevent UI Clicks in Unity from “Bleeding Through” to 3D Objects Behind Them
  • Make objects like wires and cables easily in Unity using Ciihuy Curved Mesh
  • [SOLVED] Can’t Add Custom Domain to Blogger After Losing CNAME Verification
  • iOS App Icon Generator by CiihuyCom
© 2026 ThirteeNov | Powered by Superbs Personal Blog theme