On 10 Dec 2004 01:54:44 -0800, ComputerSnack <pr******@yahoo.com> wrote:
Okay, I have a page that is dynamically generated from a database. One
of the database fields has a lot of misc. html and inline style tags in
it.
I would be remiss to fail to mention this: while you might have your hands
tied in this matter, this is about the worst way to implement this. There
is no means for removing style completely once it's applied - the best you
can do is replace it with some other style, which may or may not match the
particular UA's rendering defaults. It's a little like salting your soup.
You can always add a bit more, but you can't really take it out once it's
in there.
Therefore, the best way to implement what you're after is to send no CSS
with the data, and instead add the CSS only where you want it. The best
means based on what you have is to use a server script to remove all style
attributes from the included markup, and then add new CSS to it as you
require.