CSS Not selector

CSS Not selector

I need some help with a CSS not selector.

I know this is not jquery selector as such but it would be straight forward for a reasonable web developer.

I need to apply a:visited style to all anchors that are not inside 
(.className > li )
I tried the following
:not(.className > li)a:visited
  {     
       color:#800080;
  }
But is not working.
Can someone help me with this.
Thanks