Prev Demo
Fullside Navigation Bar
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Navigation bar</title> <style> body { margin: 0; } ul { list-style-type: none; margin: 0; padding: 0; width: 25%; background-color: #808080; position: fixed; height: 100%; overflow: auto; } li a { display: block; color: black; padding: 8px 0 8px 16px; text-decoration: none; text-align:center; } li a.active { background-color: green; color: white; } li a:hover:not(.active) { background-color: red; color: white; text-align:left; } </style> </head> <body> <ul> <li><a class="active" href="#home">TechFunda</a></li> <li><a href="#news">DotNetFunda</a></li> <li><a href="#contact">ITFunda</a></li> <li><a href="#about">KidsFunda</a></li> </ul> <div style="margin-left:25%;padding:1px 16px;height:1000px;"> <h2>Full-height Side Nav</h2> <p> Have a .NET related question or topic to discuss? Write a Post and get responses from community members. You can also respond to the existing posts and win monthly prizes as well as gain community credit points. </p> <p> Have a .NET related question or topic to discuss? Write a Post and get responses from community members. You can also respond to the existing posts and win monthly prizes as well as gain community credit points. </p> <p> Have a .NET related question or topic to discuss? Write a Post and get responses from community members. You can also respond to the existing posts and win monthly prizes as well as gain community credit points. </p> <p> Have a .NET related question or topic to discuss? Write a Post and get responses from community members. You can also respond to the existing posts and win monthly prizes as well as gain community credit points. </p> </div> </body> </html>
Note: We DO NOT save your trial code in our database.
Output