/* Style accordion's visible panels (buttons) */ .semester { background-color: #4B0082; color: #FFF; cursor: pointer; padding: 11px; width: 100%; border-width: 3px; border-color: #FFF; border-style: outset; text-align: center; outline: none; font-size: 27px; transition: 0.4s; text-transform: uppercase; } /* Text centre alignment */ p { text-align: center; } /* When hovering, change background color */ .active, .semester:hover { background-color: #BA55D3; } /* Style invisible panel, panel that you see after clicking on visible accordion's panels */ .courses { padding: 0 18px; background-color: white; max-height: 0; overflow: hidden; transition: max-height 0.2s ease-out; margin: auto; } /* Accordion's centre alignment */ .semester { margin: 0 auto; } .semester-container { width: 65%; margin: auto; } ol { width: 45%; margin: auto; } h1 { text-align: center; } /* Style accordion's + - buttons */ .semester:after { content: '\002B'; color: #FFF; font-weight: bold; float: right; margin-left: 5px; } .active:after { content: "\2212"; } /* Style courses' list */ ol li { font-family: sans-serif; padding: 5px; color: #111; }