Hi guys,

Bit of a strange problem here. I've been working on a CMS for a client where they can preview work that they've done in a div-tag which is inside the "Admin" template for the back-end.

My problem is this: After the user styles all of their content accordingly using CKEditor and they save it, when the content is then previewed, the stylesheet for the "Admin" template applies itself within that div-tag and overwrites their styles. Is there any way to stop this from happening?

I realise I could just make the preview occur in a popup window, but that won't work for other (in this context irrelevant) reasons.

Many thanks in advance

i can't really comment because you don't have all your code on here, but you might have to make sure that you do not use the same 'class names'. for instance, create a div on your style sheet called 'admin' div, that does not apply any of the effects, and then also for all your sub items, like the p tags and link tags and what ever else there might be. if you have a general class for all div tags to do something then the style will 'stick' so rather creat it blank so they can style it without it trying to link back to the style sheet where the items might be generally marked.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.