1
Vote

Carousel Helper missing Container div

description

On viewing the emitted HTML from the following:

@using (var carousel = Html.Bootstrap().Begin(new Carousel("carousel1", false, 3500)))
    {
        using (var item = carousel.ItemWithCaption("~/Images/banner.jpg", "xx"))
        {
        <h4>xx</h4>
        <p>Who we are and what do we do?</p>
        <a class="btn btn-large btn-primary" href="#">Learn more</a>
        }

        using (var item1 = carousel.ItemWithCaption("~/Images/slide-02.jpg", "About"))
        {
        <h4>About</h4>
        <p>Company details</p>
        <a class="btn btn-large btn-primary" href="#">Learn more</a>        
        }
        using (var item2 = carousel.ItemWithCaption("~/Images/slide-03.jpg", "Contact"))
        {
        <h4>Contact</h4>
        <p>Green is a nice color</p>
        <a class="btn btn-large btn-primary" href="#">Learn more</a>
        }

        //carousel.Item("~/Images/Blue.png", "Blue");
    }
I get:
<div class="carousel" id="carousel1"><div class="carousel-inner"><div class="item active"><img alt="xx" src="/Images/banner.jpg" /><div class="carousel-caption">        <h4>xx</h4>
        <p>Who we are and what do we do?</p>
        <a class="btn btn-large btn-primary" href="#">Learn more</a>
</div></div><div class="item"><img alt="About" src="/Images/slide-02.jpg" /><div class="carousel-caption">        <h4>About</h4>
        <p>Company details</p>
        <a class="btn btn-large btn-primary" href="#">Learn more</a>        
</div></div><div class="item"><img alt="Contact" src="/Images/slide-03.jpg" /><div class="carousel-caption">        <h4>Contact</h4>
        <p>Green is a nice color</p>
        <a class="btn btn-large btn-primary" href="#">Learn more</a>
</div></div></div><a class="left carousel-control" data-slide="prev" href="#carousel1">‹</a><a class="right carousel-control" data-slide="next" href="#carousel1">›</a></div>
Please note after the <img> elements there should be a <div class=""container">. This causes a big white gap at the top ;(

comments