Skip to content

Commit

Permalink
add padding
Browse files Browse the repository at this point in the history
  • Loading branch information
bitkarrot committed Dec 1, 2023
1 parent 2a9700a commit dc94d4e
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
}
.grid {
display: grid;
grid-template-columns: repeat(2, 1fr); /* 2 columns */
gap: 20px; /* Gap between grid items */
grid-template-columns: repeat(2, minmax(250px, 1fr)); /* Adjusted columns */
gap: 20px;
justify-content: center; /* Centering the cards */
}

.container {
Expand Down Expand Up @@ -48,6 +49,21 @@
height: 100px;
fill: #FFFFFF; /* Set the default fill color */
}
/* Media query for mobile responsiveness */
@media only screen and (max-width: 767px) {
.grid {
grid-template-columns: repeat(1, 1fr); /* Adjust columns for mobile view */
}
}

/* For screens larger than 768px */
@media only screen and (min-width: 768px) {
.container {
padding-left: 20px; /* Add extra padding on the left */
padding-right: 20px; /* Add extra padding on the right */
}
}

</style>
</head>
<body>
Expand Down

0 comments on commit dc94d4e

Please sign in to comment.