Multiple IDs

I would like to have multiple id and all using hover link for all

#test1, #test2, #test3, #test4 a:hover{
color:#0F0;
}

this doesn’t work. NOT sure why??
thanks

post the html that goes with the css

That code is equivalent to

#test1{
color:#0F0;
}
#test2{
color:#0F0;
}
#test3{
color:#0F0;
}
#test4 a:hover{
color:#0F0;
}

So which of those is it that isn’t working?

As felgall has been written there are four separate rules. I guess that you expecting it is the same like:


#test1 a:[COLOR="#008080"]hover[/COLOR] {
  [B]color[/B]:[COLOR="#DAA520"]#0F0[/COLOR]
}

#test2 a:[COLOR="#008080"]hover[/COLOR] {
  [B]color[/B]:[COLOR="#DAA520"]#0F0[/COLOR];
}

#test3 a:[COLOR="#008080"]hover[/COLOR] {
  [B]color[/B]:[COLOR="#DAA520"]#0F0[/COLOR];
}

#test4 a:[COLOR="#008080"]hover[/COLOR] {
  [B]color[/B]:[COLOR="#DAA520"]#0F0[/COLOR];
}

To do that you need to expand every selector:


#test1 a:[COLOR="#008080"]hover[/COLOR], #test2 a:[COLOR="#008080"]hover[/COLOR], #test3 a:[COLOR="#008080"]hover[/COLOR], #test4 a:[COLOR="#008080"]hover[/COLOR] {
  [B]color[/B]:[COLOR="#DAA520"]#0F0[/COLOR];
}

or add to each a class, for example test:


.test a:[COLOR="#008080"]hover[/COLOR] {
  [B]color[/B]:[COLOR="#DAA520"]#0F0[/COLOR];
}