body { margin: 0; top:50%; background-color: #FFFFFF; overflow: hidden; } nav { position: relative; top: 5%; right: 0; left: 0; width: 319px; display: flex; margin: 0 auto; transform: translateY(-50%); } @media screen and (max-width: 768px) { nav { position: relative; left: 0; right: 0; width: 25%; padding: 10% 87% 9% 1%; display: table-cell; flex-direction: row; font-size: 18px; } } nav a { position: relative; width: 33.333%; display: table-cell; text-align: center; color: #949494; text-decoration: none; font-family: Verdana, Geneva, Tahoma, sans-serif; font-weight: bold; padding: 10px 20px; transition: 0.2s ease color; } nav a:before, nav a:after { content: ""; position: absolute; border-radius: 50%; transform: scale(0); transition: 0.2s ease transform; } nav a:before { top: 0; left: 10px; width: 6px; height: 6px; } nav a:after { top: 5px; left: 18px; width: 4px; height: 4px; } nav a:nth-child(1):before { background-color: yellow; } nav a:nth-child(1):after { background-color: red; } nav a:nth-child(2):before { background-color: #00e2ff; } nav a:nth-child(2):after { background-color: #89ff00; } nav a:nth-child(3):before { background-color: purple; } nav a:nth-child(3):after { background-color: palevioletred; } nav a:nth-child(4):before { background-color: darkgreen; } nav a:nth-child(4):after { background-color: lightgreen; } nav a:nth-child(5):before { background-color: darkblue; } nav a:nth-child(5):after { background-color: lightblue; } #indicator { position: absolute; left: 5%; bottom: 0; width: 30px; height: 3px; /* background-color: #fff; */ border-radius: 5px; transition: 0.2s ease left; } nav a:hover { /* color: #fff; */ } nav a:hover:before, nav a:hover:after { transform: scale(1); } nav a:nth-child(1):hover ~ #indicator { background: linear-gradient(130deg, yellow, red); } nav a:nth-child(2):hover ~ #indicator { left: 28%; background: linear-gradient(130deg, #00e2ff, #89ff00); } nav a:nth-child(3):hover ~ #indicator { left: 49%; background: linear-gradient(130deg, purple, palevioletred); } nav a:nth-child(4):hover ~ #indicator { left: 70%; background: linear-gradient(130deg, green, yellow); } nav a:nth-child(5):hover ~ #indicator { left: 89%; background: linear-gradient(130deg, darkblue, lightblue); } input[type="file"] { outline: none; padding: 4px; margin: -4px; } input[type="file"]:focus-within::file-selector-button, input[type="file"]:focus::file-selector-button { outline: 2px solid #0964b0; outline-offset: 2px; } input[type="file"]::before { top: 16px; } input[type="file"]::after { top: 14px; } input[type="file"] { position: relative; } input[type="file"]::file-selector-button { width: 136px; color: transparent; } input[type="file"]::before { position: absolute; pointer-events: none; /* top: 11px; */ left: 40px; top: 13px; color: #0964b0; content: "Upload File"; } input[type="file"]::after { position: absolute; pointer-events: none; /* top: 10px; */ left: 16px; height: 20px; width: 20px; content: ""; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230964B0'%3E%3Cpath d='M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5-5 5z'/%3E%3C/svg%3E"); } input[type="file"]::file-selector-button { border-radius: 4px; padding: 0 16px; height: 40px; cursor: pointer; background-color: white; border: 1px solid rgba(0, 0, 0, 0.16); box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.05); margin-right: 16px; transition: background-color 200ms; } input[type="file"]::file-selector-button:hover { background-color: #f3f4f6; } input[type="file"]::file-selector-button:active { background-color: #e5e7eb; }