The issue might be due to another CSS rule with higher specificity overriding your rule. For example, you might have a rule like nav a or a:visited that's causing the underline to appear. You can try increasing the specificity by using:
nav a {
text-decoration: none;
}
If that doesn't work, test by temporarily adding !important:
a {
text-decoration: none !important;
}
This helps determine if another rule is interfering. Usually, adjusting the specificity or order of your CSS rules resolves the issue.