I have a web site that uses both CSS and in-line styles. It also displays comment fields from a database. We recently added the ability for the comment fields to store HTML, but most of the style tags like font name don't work because the CSS and in-line styles are overwriting them.
Is there a way to turn off and ignore styles for a small portion of my web site?
If I define my own styles within the comment and use these as class objects, I can get the comment field to do all sorts of stuff, but my end users are not HTML ready and just want to set font name, size, color, etc.
Frankly, I'd tell the users to forget the presentation stuff and stick to the basic headings, lists and paragraphs for which you'll provide the stylin'. It sounds like they're stuck in the 20th century anyway.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan
I have a work around if anyone wants it. It's not very elegant, but it seems to do the trick. Rule #1 change all CSS to only use class definitions then reference the class names in the objects you want affected.
Instead of ignoring CSS for one object, I have to set the CSS for every other object. Fix 100's because 1 is broken?
It sucks, but I'm up late tonight making the change for my customer tomorrow.