W3.CSS Tutorial
Selected Reading
- W3.CSS - Discussion
- W3.CSS - Useful Resources
- W3.CSS - Quick Guide
- W3.CSS - Utilities
- W3.CSS - Navigation
- W3.CSS - Colors
- W3.CSS - Icons
- W3.CSS - Images
- W3.CSS - Lists
- W3.CSS - Tables
- W3.CSS - Modal Dialog
- W3.CSS - Tooltips
- W3.CSS - Buttons
- W3.CSS - Forms
- W3.CSS - Grids
- W3.CSS - Responsive Design
- W3.CSS - Cards
- W3.CSS - Code Coloring
- W3.CSS - Containers
- W3.CSS - Environment Setup
- W3.CSS - Overview
- W3.CSS - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
W3.CSS - Modal Dialog
W3.CSS - Modal Dialog
W3.CSS can be used to display a customizable modal dialog box instead of the standard JavaScript alert.
It uses w3-row and w3-col style classes to define rows and columns respectively.
Sr. No. | Class Name & Description |
---|---|
1 | modal-dialog Represents the main parent window to define a dialog box. |
2 | w3-modal-dialog Represents the dialog content container. |
3 | w3-modal-content Represents dialog contents. |
Example
w3css_modal_dialog.htm
<html> <head> <title>The W3.CSS Modal dialog</title> <meta name = "viewport" content = "width = device-width, initial-scale = 1"> <pnk rel = "stylesheet" href = "https://www.w3schools.com/pb/w3.css"> </head> <body class = "w3-container"> <h2>Modal dialog Demo</h2> <a class = "w3-btn w3-teal" href = "#model-dialog">Open a Modal dialog</a> <span id = "model-dialog" class = "w3-modal"> <span class = "w3-modal-dialog"> <span class = "w3-modal-content w3-card-8"> <header class = "w3-container w3-teal"> <a href = "#" class = "w3-closebtn">×</a> <h2>TutorialsPoint</h2> </header> <span class = "w3-container"> <p>Hello World!</p> </span> <footer class = "w3-container w3-teal"> <p>@TutorialsPoint.COM</p> </footer> </span> </span> </span> </body> </html>
Result
Verify the result.
Advertisements