Skip to content

Commit

Permalink
Merge pull request #106 from thecoding-society/faqs
Browse files Browse the repository at this point in the history
faqs margin fixed
  • Loading branch information
p-sarath-kumaran authored Sep 27, 2024
2 parents f797fe2 + e077059 commit c074006
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion css/style2.css
Original file line number Diff line number Diff line change
Expand Up @@ -749,14 +749,17 @@ div .contact_name .name {
background-color: #444;
transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out;
padding: 0 15px;
line-height: 1.6;
}
#faq .accordion-content p {
margin: 10px 0;
padding: 5px 10px;
font-size: 18px !important;
padding-right: 10px;
color: #fff;
align-items: center !important;
text-align: justify;
}

#faq .accordion-item.active {
box-shadow: 0 0 15px rgba(50, 205, 50, 0.7);
border: 1px solid rgba(50, 205, 50, 0.7);
Expand Down
4 changes: 2 additions & 2 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ document.addEventListener("DOMContentLoaded", function () {
btn.classList.remove('active'); // Remove active class from button as well
const content = item.querySelector('.accordion-content');
content.style.maxHeight = null; // Close content
content.style.padding = "0 15px"; // Ensure padding is reset when collapsed
content.style.padding = "0 0px"; // Ensure padding is reset when collapsed
});

// If clicked button's parent wasn't active, open it
if (!isActive) {
parentItem.classList.add("active");
button.classList.add("active"); // Add active class to the button for icon rotation
content.style.maxHeight = content.scrollHeight + "px"; // Set max-height dynamically
content.style.padding = "15px 15px"; // Add padding inside the accordion when opened
content.style.padding = "0px 0px"; // Add padding inside the accordion when opened
}
});
});
Expand Down

0 comments on commit c074006

Please sign in to comment.