Following the issue I mentioned in my previous question titled Margin-Right on CSS not working, I am currently engaged in a creative endeavor to redesign my school's website homepage. The progress so far has been significant, but I now require some assistance with CSS and HTML coding for dropdown buttons. Specifically, I aim to arrange the links within one of the dropdown menus side by side, forming 7 rows and 2 columns for a total of 14 links. However, my attempts at achieving this layout have resulted in all 14 links being displayed in a single column. Below is the CSS and HTML code snippet for the buttons:
.dropbtn {
background-color: #2E64FE;
color: white;
padding: 16px;
font-size: 16px;
border: none;
cursor: pointer;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown-content a:hover {
background-color: #f1f1f1
}
.dropdown:hover .dropdown-content {
display: block;
}
.dropdown:hover .dropbtn {
background-color: #2E2EFE;
}
<div class="dropdown">
<button class="dropbtn">School Office</button>
<div class="dropdown-content">
<a href="#">Principles Office</a>
<a href="#">School Nurse</a>
</div>
</div>
...
... (the rest of the dropdown sections continue here)
...
</div>
In particular, I am looking to structure the Teachers dropdown to feature both rows and columns rather than just rows.