Skip to content

Commit af2a49a

Browse files
contact section completed
1 parent bc6ec9c commit af2a49a

2 files changed

Lines changed: 135 additions & 9 deletions

File tree

index.html

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ <h2 class="section-heading "> Archieves</h2>
120120
<!-- blog post section starts here -->
121121
<section id="blog-post" class="center">
122122
<h2 class="section-heading">Blog Posts</h2>
123-
<div class="blog-posts">
123+
<div class="blog-posts center">
124124

125125
<!-- blog 1 -->
126-
<div class="blog-post">
126+
<div class="blog-post ">
127127
<aside class="blog-post__aside">
128128
<img src="./assets/img-2.jpg" alt="image2">
129129
</aside>
@@ -165,6 +165,31 @@ <h3 class="blog-post__sub-heading"> Sub Heading</h3>
165165

166166
<!-- blog post section ends here -->
167167

168+
<!-- contact section ends here -->
169+
<section id="contact-section" class="center">
170+
<h2 class="section-heading text-white">
171+
Contact Me
172+
</h2>
173+
<form>
174+
<div class="form-control">
175+
<label for="name">Name</label>
176+
<input type="text" id="name" autocomplete="name" required>
177+
</div>
178+
<div class="form-control">
179+
<label for="email">Email</label>
180+
<input type="email" id="email" autocomplete="email" required>
181+
</div>
182+
<div class="form-control">
183+
<label for="message">Message</label>
184+
<textarea name="message" id="message" ></textarea>
185+
</div>
186+
<div class="form-control form-btn-field">
187+
<button class="btn contact__btn">Submit</button>
188+
</div>
189+
</form>
190+
</section>
191+
<!-- contact section ends here -->
192+
168193

169194

170195
</main>

style.css

Lines changed: 108 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ img{
7979
font-size: 6rem;
8080
text-align: center;
8181
font-family:"Italiano", cursive ;
82+
margin: 3rem 0;
8283
}
8384

8485
/* reset code and common ends here */
@@ -179,8 +180,9 @@ margin: 1rem;
179180
/* about me section starts here */
180181
#blog-about{
181182
background-color: #4c4c4c;
182-
height: 60vh;
183+
height: 90vh;
183184
justify-content: space-evenly;
185+
184186
}
185187

186188
.cards{
@@ -215,9 +217,7 @@ margin: 1rem;
215217
margin-bottom: 1rem;
216218
text-align: center;
217219
}
218-
/* .card__btn{
219220

220-
} */
221221

222222
/* about me section ends here */
223223

@@ -231,6 +231,7 @@ margin: 1rem;
231231
border-top: 0.1rem solid;
232232
border-bottom: 0.1rem solid;
233233
width: 90%;
234+
234235
}
235236

236237
.archieves__img{
@@ -250,18 +251,21 @@ display: flex;
250251
gap: 1rem;
251252
}
252253

253-
/* .archieves__list{
254254

255-
} */
256255

257256

258257
/* archieves section ends here */
259258

260259

261260
/* blog-post section starts here */
262261

262+
.blog-posts{
263+
gap:2rem
264+
}
265+
263266
.blog-post__heading{
264-
margin-bottom: 2rem;
267+
margin-bottom: 1rem;
268+
font-size: 2.5rem;
265269
}
266270

267271
.blog-post{
@@ -279,19 +283,85 @@ gap: 1rem;
279283
}
280284

281285
.blog-post__aside{
286+
/* here, flex 1 means it will take 1/3 of the div space
287+
if another sibling div in the side */
282288
flex: 1;
283289
}
284290

285291
.blog-post__content{
292+
/* flex 2 means it will take 2/3 of the div space */
286293
flex: 2;
287294
display: flex;
288295
justify-content: space-evenly;
289296
flex-direction: column;
297+
padding: 1rem;
298+
gap: 1rem;
290299
}
291300

301+
.blog-post__sub-heading{
302+
font-size: 2rem;
303+
}
304+
305+
306+
.blog-post__description{
307+
font-size: 1.6rem;
308+
text-align: justify;
309+
}
310+
311+
312+
.blog-post__btn{
313+
width: 30%;
314+
}
292315

293316
/* blog-post section ends here */
294317

318+
/* contact section starts here */
319+
form{
320+
box-shadow: var(--shadow);
321+
padding: 2rem;
322+
color: #fff;
323+
margin: 1rem;
324+
325+
}
326+
327+
#contact-section{
328+
background-color: #4c4c4c;
329+
min-height: 95vh;
330+
}
331+
332+
.form-control{
333+
margin-bottom: 1.5rem;
334+
display: flex;
335+
justify-content: center;
336+
align-items: center;
337+
}
338+
339+
.form-control label{
340+
font-size: 1.6rem;
341+
flex: 0.3;
342+
}
343+
344+
.form-control > input,textarea{
345+
flex: 0.7;
346+
width: 40rem;
347+
padding: 2rem 1rem;
348+
border:none;
349+
border-radius: 0.6rem;
350+
}
351+
352+
.form-control > textarea{
353+
resize: none;
354+
height: 12vh;
355+
}
356+
357+
358+
.form-btn-field{
359+
display: flex;
360+
justify-content: end;
361+
}
362+
363+
/* contact section ends here */
364+
295365

296366
/* responsive starts here */
297367
@media screen and (max-width: 992px) {
@@ -321,11 +391,24 @@ gap: 1rem;
321391
flex-direction: column;
322392
}
323393
#blog-about{
324-
min-height: auto;
394+
min-height: auto;
395+
325396
}
326397

327398
#archieves{
328399
min-height: auto;
400+
401+
}
402+
403+
.blog-post{
404+
width: 80%;
405+
flex-direction: column;
406+
407+
}
408+
409+
410+
#contact-section{
411+
min-height: auto;
329412
}
330413

331414
}
@@ -375,6 +458,24 @@ flex-direction: column;
375458
flex-direction: column;
376459
width: 90%;
377460
}
461+
462+
.blog-post{
463+
width: 90%;
464+
}
465+
466+
form{
467+
width: 90%;
468+
}
469+
470+
.form-control{
471+
flex-direction: column;
472+
}
473+
474+
475+
.form-control > input,textarea{
476+
margin-top: 1rem ;
477+
}
478+
378479
}
379480
/* responsive ende here */
380481
}

0 commit comments

Comments
 (0)