- This topic has 1 reply, 2 voices, and was last updated 4 years, 11 months ago by
Support. This post has been viewed 1064 times
Viewing 2 posts - 1 through 2 (of 2 total)
-
AuthorPosts
-
August 13, 2021 at 11:15 am #10039155
hidroxid
ParticipantHello
Porto HTML has option to show an X on input fields for clear it?
In this moment i am using a button with class=”input-group-append”, but it use so much space.
Thanks!
August 13, 2021 at 9:27 pm #10039160Support
KeymasterHello, please check these examples:
<div class="container shadow min-vh-100 py-4"> <div class="row"> <div class="col-md-5 mx-auto"> <div class="small fw-light">search input with icon</div> <div class="input-group"> <input class="form-control border-end-0 border rounded-pill" type="search" value="search" id="example-search-input"> <span class="input-group-append"> <button class="btn btn-outline-secondary bg-white border-bottom-0 border rounded-pill ms-n5" type="button"> <i class="fa fa-search"></i> </button> </span> </div> </div> </div> <div class="row mt-5"> <div class="col-md-5 mx-auto"> <div class="small fw-light">rounded search input only (with close X)</div> <div class="input-group"> <input class="form-control border rounded-pill" type="search" value="search" id="example-search-input"> </div> </div> </div> <div class="row mt-5"> <div class="col-md-5 mx-auto"> <div class="small fw-light">rounded search input with icon</div> <div class="input-group"> <input class="form-control border-end-0 border" type="search" value="search" id="example-search-input"> <span class="input-group-append"> <button class="btn btn-outline-secondary bg-white border-start-0 border-bottom-0 border ms-n5" type="button"> <i class="fa fa-search"></i> </button> </span> </div> </div> </div> <div class="row mt-5"> <div class="col-md-5 mx-auto"> <div class="small fw-light">search input only (with close X)</div> <div class="input-group"> <input class="form-control border" type="search" value="search" id="example-search-input"> </div> </div> </div> </div>CSS:
.ms-n5 { margin-left: -40px; }Let me know if you have any questions.
Kind Regards,
Jonas
-
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
This topic is marked as "RESOLVED" and can not rceive new replies.