1-
2- /* Code I did not know about was found on W3Schools and other tutorial sites */
3-
4-
5- /* reset box sizing */
61* {
2+ margin : 0 ;
3+ padding : 0 ;
74 box-sizing : border-box;
85}
96
10- /* main layout - black background with flexbox */
117body , html {
128 background-color : black;
139 min-height : 100vh ;
14- margin : 0 ;
15- padding : 0 ;
1610 display : flex;
1711 flex-direction : column;
1812 color : white;
1913}
2014
21- /* header with yellow background */
2215header {
2316 background-color : yellow;
2417 padding : 10px ;
@@ -29,18 +22,15 @@ header {
2922 justify-content : center;
3023 align-items : center;
3124 position : relative;
32-
3325}
3426
35- /* logo positioned on the left */
3627.logo {
3728 height : 50px ;
3829 margin-right : 15px ;
3930 position : absolute;
4031 left : 10px ;
4132}
4233
43- /* sticky nav bar */
4434nav {
4535 margin-top : 20px ;
4636 text-align : center;
5242 border : solid black 2px ;
5343}
5444
55- /* nav links styling */
5645nav a {
5746 display : inline-block;
5847 text-decoration : none;
@@ -61,27 +50,23 @@ nav a{
6150 background-color : yellow;
6251 font-weight : bold;
6352 font-size : 1.5em ;
64- padding : 15px ;
53+ padding : 15px ;
6554 border-radius : 5px ;
6655 transition : background-color 0.5s , color 0.5s ;
67-
6856}
6957
70- /* hover effect for nav links */
7158nav a : hover {
7259 background-color : black;
7360 color : yellow;
7461 text-decoration : underline;
7562}
7663
77- /* main content area */
7864main {
7965 flex : 1 ;
8066 padding : 2rem ;
8167}
8268
83- /* images centered and responsive */
84- .img {
69+ img {
8570 width : 50% ;
8671 height : auto;
8772 display : block;
@@ -91,33 +76,41 @@ main{
9176
9277.gallery-images {
9378 display : flex;
94- flex-wrap : nowrap;
95- gap : 5em ;
96- width : 25% ;
79+ flex-wrap : wrap;
80+ gap : 2em ;
81+ width : 100% ;
82+ justify-content : center;
83+ }
9784
85+ .gallery-images img {
86+ max-width : 100% ;
87+ height : auto;
88+ }
9889
90+ iframe {
91+ display : block;
92+ margin : 20px auto;
93+ width : 560px ;
94+ max-width : 100% ;
95+ height : 315px ;
9996}
10097
101- /* main heading */
10298h1 {
10399 font-size : 3em ;
104- margin : 0 ;
105100 padding : 20px ;
106101 color : black;
107102 background-color : yellow;
108103 font-style : italic;
109104 text-align : center;
110105}
111106
112- /* paragraph text */
113107p {
114108 font-size : 1.2em ;
115109 line-height : 1.6 ;
116110 margin-top : 20px ;
117111 text-align : center;
118112}
119113
120- /* h2 subheading */
121114h2 {
122115 font-size : 2em ;
123116 color : white;
126119 margin-bottom : 20px ;
127120}
128121
129- /* ordered list styling */
130- .ol {
122+ ol {
131123 background-color : yellow;
132124 color : black;
133125 padding : 20px 40px ;
@@ -137,22 +129,20 @@ h2 {
137129 line-height : 1.8 ;
138130}
139131
140- /* table styling */
141- .table {
132+ table {
142133 width : 50% ;
143134 border-collapse : separate;
144- border-spacing : 10px 10 px ;
135+ border-spacing : 10px ;
145136 background-color : yellow;
146137 color : black;
147138 margin : auto;
148139}
149140
150- . table th ,
151- . table td {
141+ table th ,
142+ table td {
152143 text-align : left;
153144}
154145
155- /*form submission css*/
156146form {
157147 background-color : yellow;
158148 color : black;
@@ -170,28 +160,29 @@ form {
170160 padding : 10px 20px ;
171161 font-size : 1em ;
172162 border-radius : 5px ;
163+ cursor : pointer;
173164}
174165
175166.submit-button : hover {
176167 background-color : red;
177168 color : black;
178169}
179170
180- /* footer at bottom */
181171footer {
182- bottom : 0 ;
183172 width : 100% ;
184173 padding : 10px ;
185174 background-color : yellow;
186175 font-style : italic;
187176 font-size : 1.5em ;
188177 text-align : center;
189178 color : black;
190- display : block;
191-
192179}
193180
194- /* hover effect for footer links */
181+ footer a {
182+ color : black;
183+ text-decoration : none;
184+ }
185+
195186footer a : hover {
196187 background-color : black;
197188 color : yellow;
@@ -200,7 +191,6 @@ footer a:hover {
200191 border-radius : 5px ;
201192}
202193
203- /* laptop and smaller screens */
204194@media (max-width : 1024px ) {
205195 .logo {
206196 height : 45px ;
@@ -215,12 +205,11 @@ footer a:hover {
215205 font-size : 2.5em ;
216206 }
217207
218- . img {
208+ img {
219209 width : 70% ;
220210 }
221211}
222212
223- /* tablets */
224213@media (max-width : 768px ) {
225214 .logo {
226215 height : 35px ;
@@ -248,29 +237,44 @@ footer a:hover {
248237 font-size : 1em ;
249238 }
250239
251- . img {
240+ img {
252241 width : 90% ;
253242 }
254243
255244 main {
256245 padding : 1rem ;
257246 }
247+
248+ .gallery-images {
249+ flex-direction : column;
250+ align-items : center;
251+ gap : 1em ;
252+ }
253+
254+ iframe {
255+ width : 100% ;
256+ }
257+
258+ table {
259+ width : 100% ;
260+ font-size : 0.9em ;
261+ }
258262}
259263
260- /* mobile phones */
261264@media (max-width : 480px ) {
262265 nav a {
263266 font-size : 1em ;
264267 padding : 8px ;
265268 display : block;
266- margin : 5px 0 ;
269+ margin : 5px auto;
270+ width : 90% ;
267271 }
268272
269273 h1 {
270274 font-size : 1.5em ;
271275 }
272276
273- . img {
277+ img {
274278 width : 100% ;
275279 }
276280}
0 commit comments