Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to bring bootstrap 3 panels into bootstrap 2 website?

I searched alot but couldn't find anything! How can I do it? Is there any library or something like that or any fix?

like image 620
Mohammad Areeb Siddiqui Avatar asked Sep 05 '13 18:09

Mohammad Areeb Siddiqui


1 Answers

Panels in Bootstrap 3 are only construct with CSS. You will find the code in less/panels.less

To make it yourself easy: open panels.less an add the line below at the top of this file:

@import "variables.less";
@import "mixins.less";

Compile this file with any less compiler to css. Copy the result in your BS2 document below the Bootstrap's CSS.

See: http://bootply.com/79222

The panel header (h3) got a line-height of 40px from the BS2 Css, ao add one extra line of css to undo this: .panel-heading > h3 {line-height:20px;}.

You could also copy the panels.less to your Twitter's Bootstrap 2 less and import it in bootstrap.less and compile this. In this case copy the panel variables from variables.less to variables.less of Bootstrap 2 at least.

like image 86
Bass Jobsen Avatar answered Nov 03 '22 00:11

Bass Jobsen