Should I include bootstrap.css and bootstrap-responsive.css together?
Asked Answered
E

3

44

Should I include two css file or one is enough?

<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" media="all" />
<link rel="stylesheet" href="bootstrap/css/bootstrap-responsive.min.css" media="all" />

OR

<link rel="stylesheet" href="bootstrap/css/bootstrap-responsive.min.css" media="all" />
Engenia answered 12/7, 2012 at 15:26 Comment(1)
Its no more necessary from version 3Geologize
M
62

Bootstrap 2

You should include both, the first one defines all the styles for html elements whilst the second one adds responsiveness to the layout.

Bootstrap 3

Only one css file will be included.

Happy coding!

Martin answered 12/7, 2012 at 15:34 Comment(1)
Its no more necessary from version 3Geologize
B
58

Both of the files should be included as of Bootstrap 2.


But with Bootstrap 3 only one css file will be included.

Responsive CSS is no longer separate and all responsive features are now compiled into the core bootstrap.css file near. Separate files are no longer required, and have thus been removed

Source: https://github.com/twitter/bootstrap/pull/6342

Edit: If you want to include bootstrap 3 css you can use this CDN version:

<link rel="stylesheet" type="text/css" 
   href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"/>
Breaux answered 4/5, 2013 at 21:33 Comment(0)
L
14

You can use the official Twitter Bootstrap download helper in order to have one CSS file named bootstrap.css (resp. bootstrap.min.css) which will contain the following CSS parts:

  • Scaffolding
  • Base CSS
  • Components
  • JS Components
  • Miscellaneous
  • Responsive
Lombard answered 12/7, 2012 at 15:44 Comment(1)
No more necessary from version 3Geologize

© 2022 - 2024 — McMap. All rights reserved.