.district-items p {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0; /* remove default paragraph spacing */
}

.district-items p a {
  flex: 1 1 calc(25% - 12px); /* 4 per row */
  box-sizing: border-box;
  background: #ffffff;
  border: 2px solid #0073e6;
  border-radius: 8px;
  padding: 15px 10px;
  text-align: center;
  text-decoration: none;
  color: #004EC3;
  font-size: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.25s ease;
}

.district-items p a:hover {
  background: #81bffc;
  color: #ffffff;
  transform: translateY(-2px);
  border-color: #004ec3;
  font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
  .district-items p a {
    flex: 1 1 calc(45% - 12px);
  }
}

@media (max-width: 480px) {
  .district-items p a {
    flex: 1 1 100%;
  }
}
"https://schoolwiki.in/index.php?title=ഫലകം:Listofdistricts2/styles.css&oldid=2866128" എന്ന താളിൽനിന്ന് ശേഖരിച്ചത്