HTML CSS examples for CSS Widget:Menu Bar
Highlight left menu bar with left border
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #sidebarnav {<!--from w w w . ja v a 2 s . com--> width:250px; background-color:#202020; height: 100%; float:left; position:fixed; border-right: 1px solid #bbb; } .button-selected { position: relative; text-align:left; width: 236; padding-left: 14px; padding-top: 6px; padding-bottom: 6px; background-color:#161616; color: #fff; border-top: 1px solid #0A0A0A; box-shadow: 0px 1px 0px rgba(255, 255, 255, 0.04) inset; overflow:auto; cursor: pointer; } .button-selected:after { content: ''; display: block; position: absolute; top: 0; bottom: 0; left: 0; width: 4px; background: black; } </style> </head> <body> <div id="sidebarnav"> <br> <a href="blog"> <div class="button-selected"> Blog </div> </a> </div> </body> </html>