there is many ways .
1- using less ( in your less file include your bootstrap like this )
.bootstrap {
@import "/path-to-bootstrap-less.less"
@import "/path-to-bootstrap-responsive-less.less"
}
2- detailed solution :
The final fix was to use SASS (recommended by someone off-site), as that allows you to nest elements and then automatically produce the final CSS. Step by step the process is:
- Concatenate the two Bootstrap files (
bootstrap.css
and bootstrap-responsive.css
) into bootstrap-all.css
.
- Create a new SASS file,
bootstrap-all.scss
, with the content div.bootstrap {
.
- Append
bootstrap-all.css
to bootstrap-all.scss
.
- Close the
div.bootstrap
selector by appending }
to bootstrap-all.scss
.
- Run SASS on
bootstrap-all.scss
to produce a final CSS file.
- Run YUI Compressor on the final file to produce a minimised version.
- Add minimised version to head element and wrap everything I want the styles to apply to in
<div class="bootstrap"></div>
.
for reference see this links link 1