Affichage des articles dont le libellé est bootstrap. Afficher tous les articles
Affichage des articles dont le libellé est bootstrap. Afficher tous les articles

vendredi 22 août 2014

[Bootstrap] Sticky left sidebar

Apply affix (http://getbootstrap.com/javascript/#affix) and scrollspy (http://getbootstrap.com/javascript/#scrollspy)


body {
   position: relative;
}

<body data-spy="scroll" data-target=".mynav">
   <div class="row">

      <div class="col-md-3 mynav">
         <ul class="nav nav-pills nav-stacked" data-spy="affix" data-offset-top="60" data-offset-bottom="200">
            <li>
               <a href="#menu1">menu1</a>
            </li>
            <li>
               <a href="#menu2">menu2</a>
            </li>
         </ul>
      </div> <!--div col-md-3-->

      <div class="col-md-9">
         <div id="menu1">
            blabla
         </div>
         <div id="menu2">
            blabla
         </div>
      </div> <!--div col-md-9-->

   </div> <!--div row-->
</html>

jeudi 21 août 2014

[Bootstrap] Sticky footer

http://stackoverflow.com/a/25075517


 $(document).ready(function () {
//http://stackoverflow.com/a/25075517
            var $docH = $(document).height();
            // The document height will grow as the content on the page grows.
            $('.my-footer').css({
                /*
                The default height of .navbar is 50px with a 1px border,
                change this 52 if you change the height of your footer.
                */
                top: ($docH - 52) + 'px'
            });
        });



 <div id="footer" class="my-footer">
      <div class="container">
        <p class="text-muted credit">toto.com</p>
      </div>
    </div>

jeudi 23 août 2012

Bootstrap 2.1.0 est sorti !

Quelle surprise ! Le fameux framework initié par Twitter vient de passer en 2.1.0.

Au menu de cette nouvelle version : une nouvelle documentation beaucoup plus claire et de nouveaux composants :



  •     Submenu support on dropdowns
  •     Affix JavaScript plugin
  •     Block level buttons
  •     State classes on table rows
  •     Improved disabled states on navs and dropdowns
  •     The navbar component is now white by default, with an optional class to darken it
  •     Improved prepended and appended inputs
  •     New base font-size and line-height
  •     Added variable for navbar collapse trigger point
  •     Fluid grid offsets
  •     Fluid grid system variables are no longer fixed percentages
  •     Removed LESS docs page

Categories