Skip to content

Commit 4e618ab

Browse files
Merge pull request #1139 from imranah10/main
Enhanced FAQs
2 parents a565f5d + 81a25bd commit 4e618ab

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

Projects/Education Website/css/style.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ header {
280280
/* ========================================== FAQs ========================================== */
281281

282282
.faqs {
283+
283284
background: var(--color-bg1);
284285
box-shadow: inset 0 0 3rem rgba(0, 0, 0, 0.5);
285286
}
@@ -295,7 +296,7 @@ header {
295296
display: flex;
296297
align-items: center;
297298
gap: 1.4rem;
298-
height: fit-content;
299+
height:100px;
299300
background: var(--color-primary);
300301
cursor: pointer;
301302
}
@@ -320,6 +321,10 @@ header {
320321
}
321322

322323

324+
.faqheight{
325+
height: fit-content;
326+
}
327+
323328
/* ========================================== TESTIMONIALS ========================================== */
324329

325330
.testimonials__container {

Projects/Education Website/main.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ window.addEventListener('scroll', () => {
88

99
// show/hide faq answer
1010

11+
1112
const faqs = document.querySelectorAll(".faq");
1213

1314
faqs.forEach(faq => {
1415
faq.addEventListener("click", () => {
1516
faq.classList.toggle("open");
17+
faq.classList.toggle('faqheight')
1618

1719
// change icon
1820
const icon = faq.querySelector(".faq__icon i");

0 commit comments

Comments
 (0)