You cannot have several elements with the same Server ID inside a common NamingContainer.
If you really want to have the same Server ID, put your controls inside separate NamingContainer (RepeaterItem?).
Now if you need the same Html/DOM ID, you can't have that.
Use something else than the Id to distinct your elements from a CSS point of view.
You could use partially matching ID though...
*[id*="_MyButtonID"].red {
background-color: red;
}