Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added search icon in every search bar #829

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,19 @@ <h3 class="sub-head">Every component, on the right place!!</h3>

<div class="container" id="components">
<!-- Search Bar -->
<!-- <div id="searchBar">-->
<!-- <h1>Search Component</h1><br>-->
<!-- <input type="text" id="componentSearch" placeholder="Enter Component Name" oninput="filterComponents()">-->
<!-- </div>-->
<div id="searchBar">
<h1>Search Component</h1><br>
<input type="text" id="componentSearch" placeholder="Enter Component Name" oninput="filterComponents()">
<div class="search-container">
<input type="text" id="componentSearch" placeholder="Enter Component Name" oninput="filterComponents()">
<span class="search-icon"><i class="fa fa-search"></i></span>
</div>
</div>


<a href="./assets/html_files/accordions.html" target="_blank">
<div class="zoom-effect">
<div class="box">
Expand Down
30 changes: 29 additions & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -920,4 +920,32 @@ footer p a {
width: 280px !important;
margin: 15px !important;
}
}
}
#searchBar {
text-align: center; /* Center the content within the search bar */
}

.search-container {
position: relative;
display: inline-block; /* Allow it to resize based on content */
}

#componentSearch {
width: 100%;
padding: 10px;
padding-left: 35px; /* Adjust the padding to make space for the icon */
box-sizing: border-box; /* Include padding in the element's total width and height */
}

.search-icon {
position: absolute;
left: 10px;
top: 50%;
transform: translateY(-50%);
pointer-events: none; /* Ensure the icon does not block input clicks */
color: #888; /* Adjust the color as needed */
}

.search-icon i {
font-size: 16px; /* Adjust the icon size as needed */
}