Left align and right align within div in Bootstrap

2021 Update… Bootstrap 5 (beta) For aligning within a flexbox div or row… ml-auto is now ms-auto mr-auto is now me-auto For text align or floats.. text-left is now text-start text-right is now text-end float-left is now float-start float-right is now float-end Bootstrap 4+ pull-right is now float-right text-right is the same as 3.x, and … Read more

Remove padding from columns in Bootstrap 3

You’d normally use .row to wrap two columns, not .col-md-12 – that’s a column encasing another column. Afterall, .row doesn’t have the extra margins and padding that a col-md-12 would bring and also discounts the space that a column would introduce with negative left & right margins. <div class=”container”> <div class=”row”> <h2>OntoExplorer<span style=”color:#b92429″>.</span></h2> <div class=”col-md-4 … Read more

Twitter Bootstrap Tabs: Go to Specific Tab on Page Reload or Hyperlink

Here is my solution to the problem, a bit late perhaps. But it could maybe help others: // Javascript to enable link to tab var hash = location.hash.replace(/^#/, ”); // ^ means starting, meaning only match the first hash if (hash) { $(‘.nav-tabs a[href=”#”https://stackoverflow.com/questions/7862233/+ hash +””]’).tab(‘show’); } // Change hash for page-reload $(‘.nav-tabs a’).on(‘shown.bs.tab’, function … Read more

Twitter Bootstrap 3: how to use media queries?

Bootstrap 3 Here are the selectors used in BS3, if you want to stay consistent: @media(max-width:767px){} @media(min-width:768px){} @media(min-width:992px){} @media(min-width:1200px){} Note: FYI, this may be useful for debugging: <span class=”visible-xs”>SIZE XS</span> <span class=”visible-sm”>SIZE SM</span> <span class=”visible-md”>SIZE MD</span> <span class=”visible-lg”>SIZE LG</span> Bootstrap 4 Here are the selectors used in BS4. There is no “lowest” setting in BS4 … Read more

How to vertically center a container in Bootstrap?

The Flexible box way Vertical alignment is now very simple by the use of Flexible box layout. Nowadays, this method is supported in a wide range of web browsers except Internet Explorer 8 & 9. Therefore we’d need to use some hacks/polyfills or different approaches for IE8/9. In the following I’ll show you how to … Read more

Select2 doesn’t work when embedded in a bootstrap modal

Ok, I’ve got it to work. change <div id=”myModal” class=”modal hide fade” tabindex=”-1″ role=”dialog” aria-labelledby=”myModalLabel” aria-hidden=”true”> <div class=”modal-header”> <button type=”button” class=”close” data-dismiss=”modal” aria-hidden=”true”>×</button> <h3 id=”myModalLabel”>Panel</h3> </div> <div class=”modal-body” style=”max-height: 800px”> to <div id=”myModal” class=”modal hide fade” role=”dialog” aria-labelledby=”myModalLabel” aria-hidden=”true”> <div class=”modal-header”> <button type=”button” class=”close” data-dismiss=”modal” aria-hidden=”true”>×</button> <h3 id=”myModalLabel”>Panel</h3> </div> <div class=”modal-body” style=”max-height: 800px”> (remove tabindex=”-1″ … Read more

Five equal columns in twitter bootstrap

For Bootstrap 4 Bootstrap 4 now uses flexbox by default, so you get access to its magical powers straight out of the box. Check out the auto layout columns that dynamically adjust width depending on how many columns are nested. Here’s an example: <div class=”row”> <div class=”col”> 1 of 5 </div> <div class=”col”> 2 of … Read more

Fluid or fixed grid system, in responsive design, based on Twitter Bootstrap

When you decide between fixed width and fluid width you need to think in terms of your ENTIRE page. Generally, you want to pick one or the other, but not both. The examples you listed in your question are, in-fact, in the same fixed-width page. In other words, the Scaffolding page is using a fixed-width … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)