Vertical menu and a Horizontal menu tag conflict
I would like to have both a Vertical menu and a Horizontal menu on the same page.
The two have a similiar layout with ui and li etc.
Question: How to have them not conflict?
Example below. Do you add a name like ul.menu
Not sure how to ask the question : )
Horizontal Navigation Bar
ul {
list-style-type: none;
}
li a {
display: block;
}
li {
float: left;
}
li a:hover {
background-color: #111;
}
-------------------------------------
Vertical Navigation Bar
ul {
list-style-type: none;
}
li a {
display: block;
}
li {
text-align: center;
}
li:last-child {
border-bottom: none;
}
li a.active {
background-color: #4CAF50;
color: white;
}
li a:hover:not(.active) {
background-color: #555;
color: white;
}
========================================
<ul>
<li><a class="active" href="#home">Home</a></li>
<li><a href="#news">Menu</a></li>
<li><a href="#contact">Menu</a></li>
<li><a href="#about">Menu</a></li>
</ul>
