How to use bootstrap in Meteor?
I’m trying to use bootstrap in meteor 1.0.
I add bootstrap package in meteor with this command: “meteor add bootstrap”.
But it can’t works for me correctly.
I need one row with two columns.
This is my html:
But I see two rows with 100% width. Wherein container or container-fluid works, I see this is one the screen.
What is the problem?
I need to link bootstrap.css in header? But Meteor do this automatically IMHO.
meteor add bootstrap you are actually adding Bootstrap 2.3, which does not know the
col-md-x classes. Either switch to using Bootstrap 3 using
meteor add twbs:bootstrap which will install the official Bootstrap framework (v3) or adjust your code to
Personally, I prefer using Bootstrap 3 instead of the core bootstrap package coming with Meteor core. Also, the boostrap package provided by MDG is marked as deprecated.
I recommend installing the official Twitter Bootstrap supported package:
meteor add twbs:bootstrap
See their GitHub for more details
Starting from Meteor 1.3 which offers first-class npm support, the recommended approach is to install Bootstrap directly from npm.
$ meteor npm install --save bootstrap
(This also saves
bootstrap in your
package.json file so someone else who checks out your app can install it with
meteor npm install.)
Then, in any client-side JS file (e.g.
import 'bootstrap'; import 'bootstrap/dist/css/bootstrap.css'; import 'bootstrap/dist/css/bootstrap-theme.css';
If you’re interested in more customized Bootstrap installs using SASS/SCSS, etc. check out this post.
Have you tried with other package? For example with : https://atmospherejs.com/mizzao/bootstrap-3
I think that Meteor has dropped core Bootstrap package.
- Database Administration Tutorials
- Programming Tutorials & IT News
- Linux & DevOps World
- Ebook Reviews
- PES Matches, Skills & News