Schneider
Schneider

Reputation: 2496

Starting bootstrap 3 project?

Does anybody knows what is best pratice to start a bootstrap project?

Shall elements start with

col-md.*

or

col-sm.*

Example what is common pratice?

<div class="col-md-12">
</div>

or

<div class="col-sm-12">
</div>

Upvotes: 1

Views: 80

Answers (2)

Weimin Ye
Weimin Ye

Reputation: 665

It depends what device your almost users use.

  • If your user almost use smartphones, you should apply .col-xs-*
  • If your user almost use tablets , you should apply .col-sm-*
  • If your user almost use laptops , you should apply .col-md-*
  • If your user almost use laptops/desktops, you should apply .col-lg-*

If you don't know what device your users use and you know the screen resolution, you can reference the table:

  • Small grid (≥768px) = .col-sm-*
  • Medium grid (≥992px) = .col-md-*
  • Large grid (≥1200px) = .col-lg-*

Upvotes: 1

Daniel Schulz
Daniel Schulz

Reputation: 574

Starting a Bootstrap project is best supported using the code from github or generating it using your IDE.

Your examples are both valid: the only difference is col-md-12 defines a column grid with medium sized input and a dozen columns and col-sm-12 does exactly the same twelve columns but in small size.

Upvotes: 0

Related Questions