Home >Web Front-end >CSS Tutorial >Build a vertical navigation bar using CSS
To build a vertical navigation bar, you can try running the following code.
Live Demonstration
<!DOCTYPE html> <html> <head> <style> ul { list-style-type: none; margin: 5; padding: 5; } li a { display: block; width: 70px; background-color: orange; } </style> </head> <body> <ul> <li><a href = "#home">Home</a></li> <li><a href = "#company">Company</a></li> <li><a href = "#product">Product</a></li> <li><a href = "#services">Services</a></li> <li><a href = "#contact">Contact</a></li> </ul> </body> </html>
The above is the detailed content of Build a vertical navigation bar using CSS. For more information, please follow other related articles on the PHP Chinese website!