I've been working on revamping the menu layout on my website.
Currently, I am using a list with a circle style type to display the menu options. Here's a glimpse:
Here is the code snippet:
<li class='category'><a href='$docPath/category/$catDirPath/'>$catName</a></li>
li.listCategory {
list-style-type: circle;
margin-left: 17px;
}
What I'm aiming for is to have the entire row highlighted in yellow once the user selects that section of the navigation menu.
Although the code is functional, I'm facing an issue with the styling of the <li>
tag.
My initial approach created an undesired effect:
<li class='category' id='selectedCat'><a href='$docPath/category/$catDirPath/'>$catName</a></li>
li#selectedCat {
background-color: #FFCC00;
list-style-type: disc;
}
Removing the margin set in the category class resulted in:
Unfortunately, the nice list style indicating that the option is selected disappeared...
I'm fundamentally trying to style this section:
Any suggestions or ideas on how I could achieve this styling task?
Thank you for taking the time to go through this! Your input is greatly appreciated.