Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/src/components/SearchBar/SearchBar.module.css
rd565449 r0c6b92a 1 1 .wrapper { 2 position: relative; 2 3 display: flex; 3 4 justify-content: center; 4 margin: 0px auto; 5 margin: 0 auto; 6 z-index: 105; 5 7 max-width: 600px; 6 8 width: 100%; 9 padding: 10px; 7 10 } 8 11 9 12 .searchBar, 10 13 .directionsContainer { 14 position: relative; 11 15 display: flex; 12 align-items: end; /* Ensure all items remain aligned in the center */13 width: 100%;16 align-items: center; 17 /*width: 100%;*/ 14 18 background-color: white; 15 19 padding: 10px; … … 17 21 border-radius: 30px; 18 22 box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); 19 flex-wrap: nowrap; /* Prevent items from wrapping to the next line */23 flex-wrap: nowrap; 20 24 } 21 25 … … 28 32 outline: none; 29 33 margin-right: 10px; 30 min-width: 0; /* Ensure the input field remains flexible */ 34 min-width: 0; 35 31 36 } 37 38 .dropdown { 39 position: absolute; /* Position absolute to detach from wrapper flow */ 40 top: 100%; /* Place below the search bar */ 41 left: 0; 42 background-color: white; 43 border: 1px solid #ddd; 44 border-radius: 5px; 45 width: 100%; /* Match the search bar width */ 46 max-height: 200px; 47 overflow-y: auto; 48 z-index: 9999; /* Highest level to ensure it's above everything */ 49 box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); 50 } 51 52 53 .dropdownItem { 54 padding: 10px; 55 cursor: pointer; 56 transition: background-color 0.3s ease, color 0.3s ease; 57 } 58 59 .dropdownItem:hover { 60 background-color: #007bff; /* Highlight color */ 61 color: white; /* Ensure text is readable */ 62 } 63 32 64 33 65 .buttons { … … 50 82 font-size: 16px; 51 83 transition: background-color 0.3s ease; 52 width: auto;53 84 } 54 85 … … 62 93 } 63 94 64 /* Expanded view for the direction inputs */65 95 .directionsContainer { 66 flex-direction: column;67 96 gap: 10px; 68 97 } … … 73 102 gap: 10px; 74 103 } 75 76 .directionsInputs .inputField {77 flex: 1;78 }79 80 /* Media query for responsive design */81 @media (max-width: 768px) {82 .wrapper {83 max-width: 100%;84 padding: 10px;85 }86 87 /* Keep buttons and input fields inline */88 .searchBar,89 .directionsContainer {90 flex-direction: row; /* Keep items in a row */91 align-items: center; /* Keep buttons and inputs on the same line */92 flex-wrap: nowrap; /* Prevent items from wrapping */93 padding: 8px;94 }95 96 .inputField {97 width: 100%;98 flex-grow: 1;99 margin-right: 10px;100 }101 102 .buttons {103 width: auto;104 gap: 5px;105 }106 107 .iconButton {108 width: auto;109 padding: 10px;110 }111 }
Note:
See TracChangeset
for help on using the changeset viewer.