#accrodion { width:500px; height:auto; border:solid 1px; padding:10px; margin:0 auto; } #accrodion > h4 { cursor: pointer; width:100%; border: solid 1px; border-radius: 5px; } #accrodion > div { width:100%; height:auto; border:solid 1px; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; }
<body> <div> <header> <h1>accrodion</h1> </header> <div id="accrodion"> <h4>Question1</h4> <div> <p>You have to create your own html for the accordion. </p> </div> <h4>Question2</h4> <div> <p>You have to create your own html for the accordion.</p> </div> <h4>Question3</h4> <div> <p>You have to create your own html for the accordion.</p> </div> </div> <footer> <p> © Copyright by Sameer </p> </footer> </div> </body>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)