I couldn't make the clock and eth sections inline any solutions please? a nice feedback would be great!
ogundiran damilola
@Ogshabzy23101All comments
- @DrissssirDSubmitted 10 months ago@Ogshabzy23101Posted 10 months ago
i will suggest you put the 2 component into a div, then style the div to display flex, flex direction row, justify content space between. hope this is helpfull please rate my comment thanks
2 - @giovanigomez1Submitted 10 months ago
I used Html, Css and Javascript but not sure if the Html semantic structure is correct, also the user is able to open all answers at once but is it better to allow them to open a single answer at time instead? Any feedback is very welcome.
@Ogshabzy23101Posted 10 months agoi will suggest you add eventlistener to each button and target the granparent element of each button, then toggle the class list of hidden. then also check under the button event listener if each granparent equals to the current granparent, if it does then remove the hidden class
const quesContainer = document.querySelectorAll('.ques-container')
const btns = document.querySelectorAll('.btn')
btns.forEach(function (btn) {
btn.addEventListener('click', function (e) {
const question = e.currentTarget.parentElement.parentElement
quesContainer.forEach(function (newQuestion) { if (newQuestion !== question) { newQuestion.classList.remove('show-text')
} })
question.classList.toggle('show-text')
})
})
i hope the is helpful, please rate my suggestion. thanks
Marked as helpful0