Discussion Locked

Override embedded style sheet

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have text stored in DB, the text is embedded with its style sheet, we know that the closest style sheet is the influent one so i can't override the stored style sheet
example: 'this my text' is stored 'this my text'
i want to change the style before send it to client

4 replies

by ebuild

It is not evident as you think, it is a hard to do because i have a multitude of CSS and parsing the text before writing back the response is somehow complicated.

by ebuild

It is not evident as you think, it is a hard to do because i have a multitude of CSS and parsing the text before writing back the response is somehow complicated.

by tony hopkinson

Any external css will be overridden by the inline ones in the page itself. So in real terms external/outer ones do not matter.

If I understood your original problem the inline style sheet was corrupting the effects of others. So the 'simple' solution is to intercept the db text before it gets passed back as a response and the browser can act upon it with what ever styles are in scope and either rip it out or stop it conflicting.
You want to stop the style sheet embedded in the database having an impact, you've either got to take it out or change it. That would be either within the database content itself, in the query that gets it, or just after it's got. Those are your only options.

This discussion is closed to new replies.