Hi dear welcome to "CodePrime" Blog . In this post we are going to learn how to use CSS Display and !Important Property . First Creat A index.html file Copy This HTML CODE and pest it one your code editor. 2ndly creat style.css file Then Copy The CSS CODE and pest it then open the index.html file with your browser.
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS Display and !important Property || BY CodePrime</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
</div>
<div class="container">
</div>
</body>
</html>
CSS
body{
display: flex;
justify-content: center;
min-height: 100vh;
align-items: center;
}
.container{
width: 300px;
height: 300px;
background: #f09;
border-radius: 5px;
margin: 5px;
/* display */
display:block ;
visibility: visible;
display:none !important;
}
0 Comments