Twitter Bootstrap 3 Modal with Scrollable Body

Just add: .modal-content { height:250px; overflow:auto; } The height can of course be adapted to your personal needs. Working Example Update: It’s actually pretty easy. Just add: .modal-body { max-height: calc(100vh – 212px); overflow-y: auto; } to your css. It uses vh and calc, which also happen to have a good browser support (IE9+). This … Read more

Conditionally applying class attributes in React

The curly braces are inside the string, so it is being evaluated as string. They need to be outside, so this should work: <div className={“btn-group pull-right ” + (this.props.showBulkActions ? ‘show’ : ‘hidden’)}> Note the space after “pull-right”. You don’t want to accidentally provide the class “pull-rightshow” instead of “pull-right show”. Also the parentheses needs … Read more

bootstrap 3 border-radius less mixin gone

Aha! I have located the answer… Remove .border-radius() and .border-*-*-radius mixins. As only Android 2.1, iOS 3.2, and older desktop browsers require a prefixed version, we’ve removed the base mixin. Since we no longer require prefixes for independent corners, we’ve dropped those mixins as well. Mixins for a single side, like .border-left-radius, are still available. … Read more

Where can I find Bootstrap styles for HTML5 Range inputs?

There is no particular class in bootstrap for input type range but you can customize it with CSS and simple javascript. Pretty cool here is an example for that! See Demo here: jsfiddle – Input type range styling body { background: #2B353E; margin: 0; padding: 0; } #slider { width: 400px; height: 17px; position: relative; … Read more

Footer below content, but not floating mid-air if not enough content

If the height of the footer is unknown, it’s best to use flex, something in the lines of: <body> <header></header> <div class=”content”></div> <footer></footer> </body> And for CSS only this is needed: body { display: flex; min-height: 100vh; flex-direction: column; } .content { flex: 1; } And you don’t need to set display:flex to body, it … Read more

How to align tabs to top/right in bootstrap 3?

Use the class .navbar-right to push an element to the right within a navbar, or .pull-right to do the same when not in a navbar. <ul class=”nav nav-tabs navbar-right”> <li class=”active”><a href=”#”>Home</a></li> <li><a href=”#”>Tab1</a></li> <li><a href=”#”>Tab2</a></li> </ul> Good to know the other helper-classes here too: http://getbootstrap.com/css/#helper-classes

Handle Bootstrap modal hide event in Vue JS

Bootstrap uses JQuery to trigger the custom event hidden.bs.modal so it is not easily caught by Vue (which I believe uses native events under the hood). Since you have to have JQuery on a the page to use Bootstrap’s native modal, just use JQuery to catch it. Assuming you add a ref=”vuemodal” to your Bootstrap … Read more