HTML & CSS- part 14 Flashcards
1
Q
If you want to style <a> in a navbar within a <div> (like when you’re creating a navbar), which selectors would you use?
A
div#navBar ul li a {
In other words, include each parent element including the ul and the li.
2
Q
What changes would you make to convert a vertical menu to a horizontal one?
A
At the <div> level: change
display: inline-block
to
width: 100%;
At the <li> level:
display: inline;
width: 19%; (or whatever it takes to divide the horizontal space)
float: left;