General discussion

Locked

Override embedded style sheet

By ebuild ·
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 <br>
example: 'this my text' is stored <i style="">'this my text'</i>
i want to change the style before send it to client

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by Tony Hopkinson In reply to Override embedded style s ...

Just overwrite it, either with a query or by replacing the text before writing back the response

Collapse -

by ebuild In reply to

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.

Collapse -

by ebuild In reply to Override embedded style s ...

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.

Collapse -

by Tony Hopkinson In reply to Override embedded style s ...

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.

Back to Web Development Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums