Any Feedback is welcomed. Also how can i remove class from my tip items when i select more than one tip.
Abo Abaass
@aboAbassAlshaegeAll comments
- @Prajwol-ShresthaSubmitted almost 3 years ago@aboAbassAlshaegePosted almost 3 years ago
Welcome !
You can remove the ( active ) class from the options by looping like the following :
let allOptions = document.querySelectorAll(" .options"); allOptions.onclick = (event) => { allOptions.forEach( (element) => { element.classList.remove("active"); } ) event.target.classList.add("active"); }
Marked as helpful1 - @VANIMEHTASubmitted almost 3 years ago@aboAbassAlshaegePosted almost 3 years ago
Hi again . if you centerlize your div card with :
positon: absolute; top : 50%; left : 50%; transform : translate ( -50% , -50% )
you will not need any margin anywhere. and you should add ( width ) to the main box ( 320px ) for example.
0 - @VANIMEHTASubmitted almost 3 years ago@aboAbassAlshaegePosted almost 3 years ago
Welcome ! . The Html is good , But you need to edit the CSS.
1 - Set an Appropriate width to the main box . 2 - You should centerlize your main box with ( transform ) , And ( position : absolute ) like the following : position : absolute; top : 50%; left 50%; transform : translate( -50% , -50% ) . 3 - You can centerlize the ( h2 ) and the ( p ) just by adding ( text-align : center ) to the parent ( the main box ). 4 - Just add ( max-width : 100% ) to the ( img ) and remove the other properties
Marked as helpful0