Edit This Code:
See Result »
<!DOCTYPE html> <html> <title>W3.CSS</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="../lib/w3.css"> <body class="w3-container"> <h2>W3.CSS Modal</h2> <p>Add the w3-card-* class to the w3-modal-content container to display the modal as a card.</p> <button onclick="document.getElementById('id01').style.display='block'" class="w3-btn">Open Modal</button> <div id="id01" class="w3-modal"> <div class="w3-modal-content w3-card-8"> <header class="w3-container w3-teal"> <span onclick="document.getElementById('id01').style.display='none'" class="w3-closebtn">×</span> <h2>Modal Header</h2> </header> <div class="w3-container"> <p>Some text..</p> <p>Some text..</p> </div> <footer class="w3-container w3-teal"> <p>Modal Footer</p> </footer> </div> </div> </body> <!-- Mirrored from www.w3schools.com/w3css/tryit.asp?filename=tryw3css_modal3 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 13 Mar 2016 11:04:52 GMT --> </html>
Result: