What you're describing is what is commonly done with languages like JSP and PHP, injecting names defined on the server. If you cannot use these languages, then I don't think it is worth the difficulty you're attempting simply to avoid having to change class names in more than one spot. Granted, that is generally a best practice, but if it makes your code unnecessarily unreadable, you should avoid it like the plague.
C# is similar enough to C++ that the transition should be smooth, and C# has Asp support which allows you to define constants and drop them directly in the page.
However assuming that you don't want to switch language, my advice is to do the next best thing: Have a C++ header and a css file which declare the same names. If you need to change the names, you need only change in these two places, and you've lost little extra time in doing so. Don't lose sight that simplicity is your objective, not avoiding duplication of code, and in this case, I can't possibly think that what you're attempting is the simplest solution.