DevPlatform
Home
Components
Search
Submit
Earn
Login
Sign Up Free
Icon Inside Form - Preview | DevPlatform
DevPlatform
Categories
Accordion
Animation
Box Shadow
Button
Card
Footer
Form
Gallery
Hero Section
Inputs
Loader
Marquee
Modal
Modules
Navbar
Progress Bar
Radio Buttons
Search-Bar
Sections
Slider
Tab
Timeline
Toggle
Icon Inside Form
abhishek001
Jan 25, 2026
7
0
Share
Live Preview
Refresh
Live Editor
HTML
CSS
JS
HTML
CSS
JavaScript
1
<div class="container"> <div class="icon-input"> <span class="icon">📧</span> <input type="email" placeholder="Enter your email"> </div> </div>
1
* { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Segoe UI', sans-serif; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem; } .container { width: 100%; max-width: 400px; } .icon-input { position: relative; display: flex; align-items: center; background: white; border-radius: 15px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); transition: all 0.3s ease; } .icon-input:focus-within { box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3); transform: translateY(-5px); } .icon { padding: 1.25rem 1rem 1.25rem 1.5rem; font-size: 1.5rem; background: linear-gradient(135deg, #667eea, #764ba2); display: flex; align-items: center; } .icon-input input { flex: 1; padding: 1.25rem 1.5rem; font-size: 1.05rem; color: #2d3748; background: transparent; border: none; outline: none; } .icon-input input::placeholder { color: #a0aec0; } @media (max-width: 768px) { .icon { padding: 1rem 0.875rem 1rem 1.25rem; font-size: 1.25rem; } .icon-input input { font-size: 1rem; padding: 1rem 1.25rem; } }
1
Comments
0
Want to comment?
Please
login
or
sign up
to post comments.
No comments yet
Be the first to comment on this component!
Comments 0
Want to comment?
Please login or sign up to post comments.
No comments yet
Be the first to comment on this component!