title: Customizing Carousel of Twitter Bootstrap
body: <p>Questions about using Carousel in Twitter Bootstrrap</p>
  
  <p>I’m new beginner to Twitter Bootstrap. Now I want to create a carousel in my page. But I ran into some problems.</p>
  
  <p>Firstly, I find no where in css file to make my carousel to be placed at center.</p>
  
  <p>Secondly, I don’t know how to make the width caption to be same as my images in carousel.</p>
  
  <p>Here’s my html code:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
    &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;title&gt;Test&lt;/title&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
      &lt;meta name="description" content=""&gt;
      &lt;meta name="author" content=""&gt;
  
      &lt;!-- Le styles --&gt;
      &lt;link href="rootfolder/bootstrap/docs/assets/css/bootstrap.css" rel="stylesheet"&gt;
      &lt;link href="rootfolder/bootstrap/docs/assets/css/bootstrap-responsive.css" rel="stylesheet"&gt;
      &lt;link href="rootfolder/bootstrap/docs/assets/css/docs.css" rel="stylesheet"&gt;
      &lt;link href="rootfolder/bootstrap/docs/assets/js/google-code-prettify/prettify.css" rel="stylesheet"&gt;
      &lt;link href="rootfolder/bootstrap/docs/assets/css/bootstrap-carousel.css" rel="stylesheet"&gt;
      &lt;link href="rootfolder/css/temp.css" rel="stylesheet"&gt;
  
      &lt;!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --&gt;
      &lt;!--[if lt IE 9]&gt;
        &lt;script src="http://html5shim.googlecode.com/svn/trunk/html5.js"&gt;&lt;/script&gt;
      &lt;![endif]--&gt;
  
      &lt;!-- Le fav and touch icons --&gt;
      &lt;link rel="shortcut icon" href="assets/ico/favicon.ico"&gt;
      &lt;link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/ico/apple-touch-icon-144-precomposed.png"&gt;
      &lt;link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/ico/apple-touch-icon-114-precomposed.png"&gt;
      &lt;link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/ico/apple-touch-icon-72-precomposed.png"&gt;
      &lt;link rel="apple-touch-icon-precomposed" href="assets/ico/apple-touch-icon-57-precomposed.png"&gt;
  
      &lt;script type="text/javascript"&gt;
        $(function () {  
          $('.dropdown-toggle').dropdown();  
        });
      &lt;/script&gt;
  
      &lt;!--Lightbox--&gt; 
      &lt;script type="text/javascript"&gt;
        $(function () {  
          $('.carousel').carousel('cycle') 
        });
      &lt;/script&gt;
    &lt;/head&gt;
  
    &lt;body data-spy="scroll" data-target=".subnav" data-offset="50"&gt;
  
    &lt;!-- Navbar
  ================================================== --&gt;
      &lt;div class="navbar navbar-fixed-top"&gt;
        &lt;div class="navbar-inner"&gt;
          &lt;div class="container"&gt;
            &lt;button type="button"class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"&gt;
              &lt;span class="icon-bar"&gt;&lt;/span&gt;
              &lt;span class="icon-bar"&gt;&lt;/span&gt;
              &lt;span class="icon-bar"&gt;&lt;/span&gt;
                &lt;/button&gt;
                &lt;a class="brand" href="http://about.me/nienyiho"&gt;Nien-Yi Ho&lt;/a&gt;
                &lt;div class="nav-collapse collapse"&gt;
                  &lt;ul class="nav"&gt;
                &lt;li class="dropdown" id="accountmenu"&gt;  
                  &lt;a class="dropdown-toggle" data-toggle="dropdown" href="#"&gt;About&lt;b class="caret"&gt;&lt;/b&gt;&lt;/a&gt;  
                  &lt;ul class="dropdown-menu"&gt;  
                    &lt;li&gt;&lt;a href="#"&gt;About Me&lt;/a&gt;&lt;/li&gt;  
                  &lt;/ul&gt;  
                &lt;/li&gt;
                &lt;li class=""&gt;
                  &lt;a href="http://www.nienyiho.com/photography.html"&gt;Photography&lt;/a&gt;
                &lt;/li&gt;
                &lt;li class=""&gt;
                  &lt;a href="http://www.nienyiho.com/articles.html"&gt;Articles&lt;/a&gt;
                &lt;/li&gt;
                &lt;li class=""&gt;
                  &lt;a href="http://www.nienyiho.com/forsale.html"&gt;For Sale&lt;/a&gt;
                &lt;/li&gt;
                &lt;li class=""&gt;
                  &lt;a href="http://nienyi.blogspot.tw"&gt;Blog&lt;/a&gt;
                &lt;/li&gt;
                &lt;li class=""&gt;
                  &lt;a href="http://nienyi.blogspot.tw"&gt;Contact&lt;/a&gt;
                &lt;/li&gt;
                &lt;li class="dropdown" id="accountmenu"&gt;  
                  &lt;a class="dropdown-toggle" data-toggle="dropdown" href="#"&gt;Tutorials&lt;b class="caret"&gt;&lt;/b&gt;&lt;/a&gt;  
              &lt;ul class="dropdown-menu"&gt;  
                &lt;li&gt;&lt;a href="#"&gt;1&lt;/a&gt;&lt;/li&gt;  
                &lt;li&gt;&lt;a href="#"&gt;2&lt;/a&gt;&lt;/li&gt;  
                &lt;li class="divider"&gt;&lt;/li&gt;  
                &lt;li&gt;&lt;a href="#"&gt;3&lt;/a&gt;&lt;/li&gt;  
                &lt;li&gt;&lt;a href="#"&gt;4&lt;/a&gt;&lt;/li&gt;  
              &lt;/ul&gt;  
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div class="container"&gt;
  
  &lt;!-- Masthead
  ================================================== --&gt;
  &lt;header class="jumbotron masthead"&gt;
  
    &lt;div class="inner"&gt;
      &lt;p&gt;Nien-Yi Ho Photography&lt;/p&gt;
    &lt;/div&gt;
  &lt;/header&gt;
  
    &lt;!--測試Light Box--&gt;
  
    &lt;div id="myCarousel" class="carousel slide"&gt;
    &lt;!-- Carousel items --&gt;
      &lt;div class="carousel-inner_test"&gt;
        &lt;div class="active item"&gt;
          &lt;img src="rootfolder/images/photography/all_time_collections/1.jpg" alt="" width="600" hight="900"&gt;
          &lt;div class="carousel-caption"&gt;
            &lt;h4&gt;何去何從&lt;/h4&gt;
            &lt;p&gt;台北 2008&lt;/p&gt;
          &lt;/div&gt;
        &lt;/div&gt;
  
        &lt;div class="item"&gt;
          &lt;img src="rootfolder/images/photography/all_time_collections/2.jpg" alt="" width="600" hight="900"&gt;
          &lt;div class="carousel-caption"&gt;
            &lt;h4&gt;撼動&lt;/h4&gt;
            &lt;p&gt;2008 台大合唱團冬季公演&lt;/p&gt;
          &lt;/div&gt;
        &lt;/div&gt;
  
        &lt;div class="item"&gt;
          &lt;img src="rootfolder/images/photography/all_time_collections/3.jpg" alt="" width="600" hight="900"&gt;
          &lt;div class="carousel-caption"&gt;
            &lt;h4&gt;Height of the sky.&lt;/h4&gt;
            &lt;p&gt;Paris 2002&lt;/p&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;!-- Carousel nav --&gt;
    &lt;a class="carousel-control left" href="#myCarousel" data-slide="prev"&gt;&amp;lsaquo;&lt;/a&gt;
    &lt;a class="carousel-control right" href="#myCarousel" data-slide="next"&gt;&amp;rsaquo;    &lt;/a&gt;
    &lt;/div&gt;
  
       &lt;!-- Footer
    ================================================== --&gt;
        &lt;footer class="footer"&gt;
          &lt;p&gt;Powered by &lt;a href="http://twitter.github.com/bootstrap/" target="_blank"&gt;Twitter Bootstrap&lt;/a&gt; &lt;/p&gt;
        &lt;/footer&gt;
  
      &lt;/div&gt;&lt;!-- /container --&gt;
  
          &lt;!-- Le javascript
  ================================================== --&gt;
          &lt;!-- Placed at the end of the document so the pages load faster --&gt;
      &lt;script type="text/javascript" src="http://platform.twitter.com/widgets.js"&gt;    &lt;/script&gt;
      &lt;script type="text/javascript" src="rootfolder/bootstrap/docs/assets/js/jquery.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="rootfolder/bootstrap/docs/assets/js/google-code-prettify/prettify.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="rootfolder/bootstrap/docs/assets/js/bootstrap-transition.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="rootfolder/bootstrap/docs/assets/js/bootstrap-alert.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="rootfolder/bootstrap/docs/assets/js/bootstrap-modal.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="rootfolder/bootstrap/docs/assets/js/bootstrap-dropdown.js" type="text/javascript"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="rootfolder/bootstrap/docs/assets/js/bootstrap-scrollspy.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="rootfolder/bootstrap/docs/assets/js/bootstrap-tab.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="rootfolder/bootstrap/docs/assets/js/bootstrap-tooltip.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="rootfolder/bootstrap/docs/assets/js/bootstrap-popover.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="rootfolder/bootstrap/docs/assets/js/bootstrap-button.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="rootfolder/bootstrap/docs/assets/js/bootstrap-collapse.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="rootfolder/bootstrap/docs/assets/js/bootstrap-carousel.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="rootfolder/bootstrap/docs/assets/js/bootstrap-typeahead.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="rootfolder/bootstrap/docs/assets/js/application.js"&gt;&lt;/script&gt;
  
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>