Reputation: 11458
Need to host some formatted messages in div
elements, so that the formatting will be completely independent from the enclosing pages' context (i.e. no properties should be propagated to my div
and its inner elements).
Which would be the best/wise approach to implement that? For some (yet unknown to me) reason, iframe
is considered as less-recommended than div
, is it? Than, how can I really isolate the div
from the context?
Or maybe, iframe
for my particular case is the preferred option?
Thanks!
Upvotes: 0
Views: 628
Reputation: 4778
I am not a big proponent of iFrames, but this seems to be the reason they exist. I say go for it.
You could always reset all properties for the div in the stylesheet.
Upvotes: 2
Reputation: 3845
Use DIV Element (class or id for the formatting referenced in the CSS). I am not sure if iFrame is compatible with all browsers.
Upvotes: 0