Skip to content

Commit 0c26a04

Browse files
committed
allow FAQ items to be closed by switching from radio to checkbox input
1 parent b664368 commit 0c26a04

3 files changed

Lines changed: 17 additions & 3 deletions

File tree

Projects/FAQ Page/faq_page.css

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ body{
3737
display: flex;
3838
gap: 1rem;
3939
align-items: center;
40+
margin-top: 10px;
4041
cursor: pointer;
4142
}
4243

@@ -68,10 +69,16 @@ body{
6869
transform: rotate(135deg);
6970
}
7071

71-
.stack input{
72+
/* .stack input{
7273
appearance: none;
74+
} */
75+
.stack input {
76+
position: absolute;
77+
opacity: 0;
78+
width: 100%;
79+
height: 100%;
80+
z-index: 2;
7381
}
74-
7582
.content{
7683
max-height: 0;
7784
overflow: hidden;

Projects/FAQ Page/faq_page.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@
1111
<div class="container">
1212
<h1>Frequently Asked Questions</h1>
1313
<div class="stack">
14-
<input type="radio" name="faq" id="faq1">
14+
<input type="checkbox" name="faq" id="faq1">
1515
<label for="faq1">
1616
<h2>01</h2>
1717
<h3>How do I apply?</h3>
1818
</label>
19+
1920
<div class="content"><p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quis molestias consequatur, illo provident nostrum repellendus officia, laudantium magnam eius, libero eaque consectetur labore? Aspernatur laudantium rem iure optio commodi ea.</p></div>
2021
</div>
2122

package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)