Skip to content

Commit 5a7621d

Browse files
committed
Fix CSS layout for mapping app
- Add box-sizing: border-box for consistent layout calculations - Fix html/body to prevent unwanted scrollbars (overflow: hidden) - Convert .container-map to absolute positioning for proper viewport filling - Standardize navbar padding to 54px across mobile and desktop (was inconsistent 50px/54px) - Add proper absolute positioning for geocoder search form overlay - Implement responsive geocoder positioning (centered on mobile, left-aligned on tablet+) - Adjust desktop layout to properly account for 250px sidebar - Increase ui-autocomplete z-index to ensure dropdown appears above search form
1 parent ad01983 commit 5a7621d

1 file changed

Lines changed: 51 additions & 6 deletions

File tree

css/catchment.css

Lines changed: 51 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,32 @@
11
/* This is used to specify the map area. */
2-
html, body, .row, .container, .container-map, #map {
2+
* {
3+
box-sizing: border-box;
4+
}
5+
6+
html, body {
7+
height: 100%;
8+
margin: 0;
9+
padding: 0;
10+
overflow: hidden;
11+
}
12+
13+
.container-map {
14+
position: absolute;
15+
top: 54px;
16+
bottom: 54px;
17+
left: 0;
18+
right: 0;
19+
}
20+
21+
#map {
322
height: 100%;
4-
padding-bottom: 16px;
23+
width: 100%;
524
}
625

726
/* Add padding on the top and bottom so the top and bottom of map align with nav bars */
827
body {
9-
padding: 54px 0;
28+
padding-top: 54px;
29+
padding-bottom: 54px;
1030
}
1131

1232
/* To remove border and shading in footer */
@@ -44,11 +64,17 @@ body {
4464
/* This is for the "normal" size off canvas menu */
4565
@media (min-width: 992px) {
4666
body {
47-
padding: 50px 250px 50px 0;
67+
padding-top: 54px;
68+
padding-bottom: 54px;
69+
padding-right: 250px;
70+
}
71+
72+
.container-map {
73+
right: 250px;
4874
}
4975

5076
.navmenu {
51-
padding: 50px 10px;
77+
padding: 54px 10px;
5278
}
5379

5480
.navmenu-toggle {
@@ -57,6 +83,25 @@ body {
5783
}
5884

5985
/* Geocoder */
60-
.ui-autocomplete {
86+
.container-map form {
87+
position: absolute;
88+
top: 10px;
89+
left: 50%;
90+
transform: translateX(-50%);
91+
width: 90%;
92+
max-width: 400px;
6193
z-index: 1000;
94+
}
95+
96+
@media (min-width: 768px) {
97+
.container-map form {
98+
left: 10px;
99+
transform: none;
100+
width: auto;
101+
max-width: 350px;
102+
}
103+
}
104+
105+
.ui-autocomplete {
106+
z-index: 1001;
62107
}

0 commit comments

Comments
 (0)