I'm having trouble styling my unordered list in CSS. I've tried different methods like referencing the class name, using ul li i, or even #divname, but nothing seems to work. Currently, I'm resorting to inline styling in the HTML page which is not ideal.
How can I properly reference these HTML elements in my CSS? More importantly, how do I know what to write in my style sheets so I can grasp the concept better?
Below is the snippet of my HTML:
<div class="navbar-container">
<ul class="navbar-items" style="display: block; margin-left: auto; margin-right: 57%; margin-top: 11px;">
<li class="nav-item">
<a class="nav-link text-dark" style="text-decoration:none; color: #333333;" asp-area="" asp-controller="Home" asp-action="Index">Home</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" style="text-decoration:none; color: #333333;" asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" style="text-decoration:none; color: #333333;" asp-area="" asp-controller="Course" asp-action="Index">Courses</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" style="text-decoration:none; color: #333333;" asp-area="" asp-controller="Professor" asp-action="Index">Professors</a>
</li>
</ul>
</div>