No decoration on links in CSS

Sebastian picture Sebastian · Aug 14, 2010 · Viewed 12.8k times · Source

Example page, Accompanying CSS

Should be a fairly basic issue but for some reason I can't figure it out.

Basically I want the links in my navbar to have no underline or colour change and remain white.

Any idea where I'm going wrong?

Answer

Delan Azabani picture Delan Azabani · Aug 14, 2010

It's because you're selecting the main .links element, but not the actual a elements inside. This should do the trick:

.links a {
  text-decoration: none;
  color: white;
}