Hey. I'm working on a simple site that makes use of a lot of CSS and Javascript. The main problem I'm dealing with right now is getting it validated. This is for a class, and the w3c validation seems to be the most important thing to our professor.
But I'm of course running into a problem. I have a lot of buttons on my page that I've defined mouseover and mouseevents for having the buttons change styles. EX:
<input type="button" id="button-out" onMouseOver="this.id='button-over';" onMouseOut="this.id='button-out';">
Now here's the problem: When I run this thing through the W3C validator, it yells at me every time I have multiple instances of an id. So if I used two buttons with the same settings as above, it would complain. They suggest that in such cases as this, I define the styles with classes instead of ids. However, from my past experience with Javascript, if I use class definitions instead of IDs, then I can no longer use that simple id="" method for my mouse events.
And sure, I could just make new ID sets for every single button, but that would leave me with a pretty ridiculously large and unmanageable CSS file.
So in cases like this, should I just ignore the validation?
But I'm of course running into a problem. I have a lot of buttons on my page that I've defined mouseover and mouseevents for having the buttons change styles. EX:
<input type="button" id="button-out" onMouseOver="this.id='button-over';" onMouseOut="this.id='button-out';">
Now here's the problem: When I run this thing through the W3C validator, it yells at me every time I have multiple instances of an id. So if I used two buttons with the same settings as above, it would complain. They suggest that in such cases as this, I define the styles with classes instead of ids. However, from my past experience with Javascript, if I use class definitions instead of IDs, then I can no longer use that simple id="" method for my mouse events.
And sure, I could just make new ID sets for every single button, but that would leave me with a pretty ridiculously large and unmanageable CSS file.
So in cases like this, should I just ignore the validation?