a:link { text-decoration: none; color: #AAAAAA; } a:visited { text-decoration: none; color: #AAAAAA; } a:hover { text-decoration: none; color: #DDDDDD; } body { color: #FFFFFF; font-family: tahoma; margin: 0; padding: 0; font-size: 20px } .topnav { overflow: hidden; background-color: #333; } .topnav a { float: left; display: block; color: #f2f2f2; text-align: center; padding: 14px 16px; text-decoration: none; font-size: 20px; } .topnav a:hover { background-color: #ddd; color: black; } .topnav .icon { display: none; } @media screen and (max-width: 600px) { .topnav a:not(:first-child) {display: none;} .topnav a.icon { float: right; display: block; } } @media screen and (max-width: 600px) { .topnav.responsive {position: relative;} .topnav.responsive .icon { position: absolute; right: 0; top: 0; } .topnav.responsive a { float: none; display: block; text-align: left; } }