-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.css
199 lines (167 loc) · 3.44 KB
/
styles.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
197
198
199
/* Reset and global styles */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html {
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}
body {
background-color: #ECDCAE; /* Light background */
display: grid;
grid-template-rows: auto 1fr auto; /* Header, Main content, Footer */
min-height: 100vh;
line-height: 1.6;
scroll-behavior: smooth; /* Smooth scrolling */
}
header {
background-color: #2a6d2d; /* Dark green header */
color: white;
padding: 1em;
text-align: center;
position: sticky;
top: 0;
width: 100%; /* Ensure it spans the entire width */
z-index: 1000;
}
nav ul {
list-style-type: none;
display: flex;
justify-content: center;
gap: 20px; /* Space between nav items */
flex-wrap: wrap;
}
nav a {
text-decoration: none;
color: black;
background-color: white;
padding: 10px 20px;
border: 1.5px solid black;
border-radius: 20px;
transition: background-color 0.3s;
}
nav a:hover {
background-color: lightsalmon;
}
main {
display: flex;
flex-direction: column;
align-items: center;
padding: 20px;
}
section {
margin-bottom: 40px;
text-align: center;
border: 5px solid black;
padding: 20px;
width: 100%;
max-width: 1200px;
}
section img {
width: 100%;
height: auto;
border: 5px solid black;
margin-top: 20px;
}
.services-container {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 20px;
}
.service-item {
display: flex;
flex-direction: column;
align-items: center;
width: 300px;
text-align: center;
margin-bottom: 20px;
border: 5px solid black;
padding: 10px;
}
.service-item img {
max-width: 100%;
height: auto;
margin-bottom: 10px;
}
footer {
background-color: gray;
text-align: center;
padding: 20px;
}
footer h2 {
color: gold;
margin-bottom: 10px;
}
footer h6 {
color: white;
margin-top: 10px;
}
footer p {
color: white;
margin: 5px 0;
}
footer p:hover {
color: lightsalmon;
cursor: pointer;
}
footer p:active {
opacity: 0.7;
}
/* Offset for fixed header */
section:target {
scroll-margin-top: 80px; /* Adjust based on header height */
}
/* Media Queries for responsiveness */
/* For tablets and larger devices */
@media (max-width: 1024px) {
nav ul {
flex-direction: column;
gap: 10px;
}
.services-container {
flex-direction: column;
align-items: center;
}
.service-item {
width: 90%;
}
}
/* For mobile devices */
@media (max-width: 768px) {
header h1 {
font-size: 1.5em;
}
nav a {
padding: 5px 10px;
font-size: 0.9em;
}
.services-container {
flex-direction: column;
align-items: center;
}
.service-item {
width: 100%;
}
}
/* For small mobile devices */
@media (max-width: 480px) {
nav ul {
flex-direction: column;
gap: 5px;
}
nav a {
padding: 5px;
font-size: 0.8em;
}
h2 {
font-size: 1.2em;
}
footer h2 {
font-size: 1em;
}
footer p {
font-size: 0.8em;
}
}