body { margin: 0; padding: 0; font-size: 1.5em; font-family: 'PT Serif'; } a { text-decoration: none; color: black; } a:hover { text-decoration: underline; } .small-header { font-size: 0.8em; color: #aaa; font-style: italic; } .header { padding: 10px; color: #aaa; } .header hr { height: 10px; border-width:1px 1px 0 1px; border-style: solid; border-color: #aaa; } .main { max-width: 1000px; margin: 0 auto; } .secondary { box-sizing: border-box; padding: 20px; } .first { width: 60%; /* background: #eef; */ } .second { width: 40%; overflow: hidden; max-height: 400px; position: relative; /* background: #efe; */ } .hidden-content { display: none; } .toggle-button { cursor: pointer; } /* Laptop and larger */ @media only screen and (min-width: 1200px) { @media only screen and (max-width: 1399px) { body { font-size: 1.4em; } .main { margin-left: 200px; margin-right: 200px; } } .secondary { float: left; } } /* iPad */ @media only screen and (min-width: 768px) and (max-width: 1199px) { body { font-size: 1.3em; } .main { margin-left: 67px; margin-right: 67px; } @media only screen and (max-width: 899px) { .main { width: 766px; margin-left: auto; margin-right: auto; } } .secondary { float: left; } } /* Smartphones */ @media only screen and (max-width: 767px) { .primary { display: flex; flex-direction: column-reverse; } .first, .second { width: 100%; } .second { max-height: 400px; overflow: hidden; } .hidden-content { display: none; } .toggle-button { display: block; } }