Problem with buttons and links in navbar
Hi,
I've been learning Dreamweaver for a week now, but I'm struggling to create buttons for the navbar. I've managed to create my unordered list (ul) and list items (li), and applied all the necessary properties.
However, I'm having trouble with the :hover selector. I understand why it's not working, but I haven't figured out how to fix it.
Following the CSS to create the buttons.
The problem is that the colour for the text in ".main-nav ul il" doesn't get applied because the text in the buttons is a link so I have created another selector called ".main-nav ul li a" to apply the colour, up to here all good...
.main-nav ul li {
display: inline-block;
color: #FFFFFF;
text-decoration: none;
margin-right: 10px;
background-color: #878787;
padding-top: 8px;
padding-right: 16px;
padding-left: 16px;
padding-bottom: 8px;
border-radius: 12px;
.main-nav ul li a {
padding-top: 0px;
text-decoration: none;
text-align: center;
color: #FFFFFF;
But when I create the hover selector from ".main-nav ul li" and set the background color to change in Orange and the text to change in Black it doesn't work again, of course because the text is a link, so i need to create 2 hover classes but this produce a weird effect when hovering.
Then I have tried to delete ".main-nav ul li" and apply all properties to ".main-nav ul il a" but the property display: inline-block doesn't work in this case and the buttons are displayed as a bullet point list...
What can I do to fix this issue? I know is probably an easy fix but I struggle to get there
Thanks in advance for your help
