forked from Technigo/project-weather-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
196 lines (172 loc) · 3.66 KB
/
style.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
body {
font-family: Montserrat;
height: 100%;
}
.weather-container {
display: flex;
flex-direction: column;
/* Stack items vertically */
justify-content: flex-start;
align-items: flex-start;
/* Align items to the left */
padding-top: 50px;
min-height: 100vh;
/* Ensure it takes up the full height of the viewport */
padding-left: 10px;
/* Optional: padding to the left for overall container */
overflow-x: hidden;
}
/* Container for condition and temperature */
.temperature-info {
display: flex;
justify-content: flex-start;
/* Align temperature info to the left */
align-items: center;
font-size: 24px;
font-weight: 400;
line-height: 25.6px;
margin-bottom: 10px;
/* Optional spacing */
}
.temperature-info p {
margin: 0 5px;
}
/* Container for sunrise and sunset */
.sun-times {
display: flex;
flex-direction: column;
align-items: flex-start;
/* Align sunrise/sunset to the left */
font-size: 24px;
font-weight: 400;
margin-bottom: 20px;
/* Space before other weather details */
line-height: 25.6px;
}
.sun-times p {
margin: 0 5px;
/* Adjust spacing between sunrise and sunset */
}
.weather-img {
margin-top: 30px;
max-width: 100%;
/* Ensure image doesn't exceed container width */
height: auto;
/* Maintain aspect ratio */
}
.weather-message {
font-family: Montserrat;
font-size: 37px;
font-weight: 700;
line-height: 45.1px;
text-align: left;
padding-right: 10px;
}
.forecast-wrapper {
display: flex;
flex-direction: column;
/* Stack items vertically */
justify-content: flex-start;
align-items: flex-start;
/* Align items to the left */
position: relative;
/* Optional: Positioning context for child elements */
}
#forecastList {
list-style-type: none;
/* Remove default list styling */
padding: 0;
/* Remove default padding */
margin: 0;
/* Remove default margin */
font-size: 21px;
line-height: 36px;
gap: 20px
}
li {
display: flex;
width: 290px;
justify-content: space-between;
font-size: 20px;
line-height: 1.6;
}
.weekday {
width: 100px;
/* Set a fixed width for all weekday names */
}
.min-max {
display: flex;
}
.min-temp {
margin-left: 10px;
}
.max-temp {
margin-right: 5px;
}
#searchContainer {
display: flex;
/* Align items horizontally */
justify-content: flex-start;
/* Align items to the left */
align-items: center;
/* Vertically center the items */
padding-top: 20px;
padding-bottom: 20px;
}
label {
font-size: 18px;
margin-right: 15px;
/* Space between the label and input */
}
#cityInput {
padding: 8px;
/* Padding for the input field */
border: 1px solid #ccc;
/* Border around the input field */
border-radius: 4px;
/* Rounded corners */
margin-right: 5px;
/* Space between the input and search button */
font-family: Montserrat;
font-weight: 500;
font-size: 16px;
}
#searchButton {
padding: 10px 12px;
/* Padding for the search button */
color: white;
border: none;
border-radius: 4px;
/* Rounded corners for the button */
cursor: pointer;
/* Pointer cursor on hover */
font-family: Montserrat;
flex-shrink: 0;
}
/* Media Queries */
/* Apply centering only on desktop screens */
@media (min-width: 768px) {
.weather-container {
align-items: center;
/* Center horizontally */
}
.temperature-info,
.sun-times,
.weather-message,
.forecast-wrapper {
text-align: left;
/* Keep content left-aligned */
width: 100%;
max-width: 600px;
/* Limit width on large screens */
}
}
@media (min-width: 768px) {
.weather-img {
max-width: 300px;
/* Limit max width for desktop */
height: auto;
/* Maintain aspect ratio */
margin-top: 30px;
}
}