0
Nav tag HTML
I seem to have trouble adding a style to the nav tags when I code. Do I need to put them in a div or can I treat it as a div? https://code.sololearn.com/WNTW22cDBnc3/?ref=app
4 ответов
0
You can add styles to nav tags using inline CSS through the style="" attribute or you can do it from an external stylesheet by selecting nav or a class or ID.
You don't seem to have any CSS rules for nav by itself in your example, only list items in lists in navs.
0
So using an inline attribute called style?
0
Yes or in an external stylesheet like you have by writing a rule for "nav" or a class/id name.
There's this thing in specificity which means that if you reference something by id in CSS it will override any other rules and so you should keep track of this to not make unwanted errors happen in your stylesheets.
A big part of mastering CSS is learning how to control and take advantage of which selectors override what.