Week 2 Day 3: Responsive web design

This commit is contained in:
2025-12-24 16:38:19 +05:30
parent 1a18cc4696
commit 080b555db1
4 changed files with 159 additions and 0 deletions

51
Week-2/Day-3/style.css Normal file
View File

@@ -0,0 +1,51 @@
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;
}
}