https://stackoverflow.com/questions/38084921/how-do-i-make-pseudo-element-before-stay-active
Note: a:active MUST come after a:hover in the CSS definition in order to be effective.
side_col { float: left; width: 20%; height: 100%; background-color: #343A47; } .side_link:before { float: left; content: ""; display: inline-block; height: 100%; width: 7px; background-color: #343A47; } #sl1:target:before, #sl2:target:before, #sl3:target:before, #sl4:target:before { background-color: #24BDE9; } .side_link { text-align: left; line-height: 50px; width: 100%; height: 50px; background: #343A47; color: #fff; font-weight: 500; } .side_link:hover { background-color: #2b303b; } discussing innerHTMLFinding HTML Elements by Id
This example demonstrates the getElementsById method.
-----------------------------------