I am creating a website with a menu bar stored in another file (solution from here). I also have the css stored in a seperate file, linked to the menu bar:
<!--#include file="menu.html" -->
Each page on my website get's highlighted if it's the current page. However, Since my html is in a seperate file, I can't just add class="current"
or something similar to that. This is what I came up with:
- add css to each site selecting
ul:nth-child(n)
that adds all needed css.
If I change the order of the elements, everything will be messed up!
Is there a better way to add css later?