html - Clear bootstrap styling for part of a page -


i'm trying setup preview box html editor on 1 of pages. made standard <div id="preview"></div> style container, in drop html source, , works fine enough.

the problem is, bootstrap's styles seeping container , 'poisoning' preview. see 2 solutions this:

  1. move preview iframe
  2. apply kind of clear/reset css element host preview

eg:

<div id="preview" class="clean-css"> </div> 
.clean-css {     div, p: {         border: 0;         margin: 0;     }     /* bunch of reset css stuff here */ } 

i consider iframe clunky solution , sort of last resort. i'd rather keep stuff on 1 page. started looking various reset css stylesheets. unfortunately, seems of them geared towards equalizing differences between browsers , don't reset styles bare values (for example, blockquote keeps bootstrap styling).

i can keep googling better reset-css stylsheet, or can try fill in holes in stylesheet have now. before that, figured should ask more experienced frontend devs what's experience this.

  • is there more comprehensive clear css solution out there?
  • is trying clear bootstrap fool's errand , should go iframe instead?

after few months of trying make reset css work, answer is: use &$^* iframe.

there many potential problems , pitfalls, balancing reset's class precedence fact css roll on legacy color / positioning attributes (which still relevant in email authoring).

iframe headache integrate page, @ least know can done, , once done, stays done.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -