Files
Harshit-Sachdev/Week-2/Day-3/style.css

52 lines
652 B
CSS

body {
font-family: Arial, sans-serif;
margin: 0;
}
header {
background-color: #222;
color: white;
text-align: center;
padding: 15px;
}
header:hover {
background-color: red;
}
.content {
display: flex;
justify-content: space-around;
padding: 20px;
}
.card {
width: 30%;
background-color: #eee;
padding: 20px;
text-align: center;
}
.card:hover {
background-color: green;
}
@media (max-width: 768px) {
.content {
flex-direction: column;
align-items: center;
}
.card {
width: 80%;
margin-bottom: 15px;
}
}
/* Mobile View */
@media (max-width: 480px) {
header h1 {
font-size: 20px;
}
}