Css framework integration only works in the specified class or id

My problem is related to my integration of projects with another site. For example, I have a site built with 0, and my specified system is built on boostrap or foundation. When I try to integrate it on my website, all my websites start using boostrap or foundation style. You can only work with this css, for example,

<div id="boostrap_only">
    <table class="table table-bordered">...</table> <!-- here works -->
</div>

<table class="table table-bordered">...</table> <!-- here don't work -->
+4
source share
1 answer

There are many ways.

1, using less (in your file less than your boot buffer)

.bootstrap {
    @import "/path-to-bootstrap-less.less"
    @import "/path-to-bootstrap-responsive-less.less"
}

2- detailed solution:

SASS ( - ), , CSS. :

  • Bootstrap (bootstrap.css bootstrap-responsive.css) bootstrap-all.css.
  • SASS, bootstrap-all.scss, div.bootstrap {.
  • bootstrap-all.css bootstrap-all.scss.
  • div.bootstrap, } bootstrap-all.scss.
  • SASS bootstrap-all.scss, CSS.
  • YUI Compressor , .
  • head , <div class="bootstrap"></div>.

. 1

+2

Source: https://habr.com/ru/post/1624610/


All Articles