Prev Demo
Text Align Property
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <style> ul { list-style-type: none; margin: 0; padding: 0; width: 200px; background-color: white; border: 1px solid black; } li a { display: block; color: green; padding: 8px 16px; text-decoration: none; } li { text-align: center; border-bottom: 1px solid #555; } li:last-child { border-bottom: 2px solid green; } li a.active { background-color: red; color: white; } li a:hover:not(.active) { background-color: pink; color: white; } </style> </head> <body> <h2>Vertical Navigation Bar with borders and aligning the links in center</h2> <ul> <li><a class="active" href="http://www.techfunda.com">TechFunda</a></li> <li><a href="http://www.dotnetfunda.com">DotNetFunda</a></li> <li><a href="http://www.itfunda.com">ITFunda</a></li> </ul> </body> </html>
Note: We DO NOT save your trial code in our database.
Output