Question

Here's my HotTowel view:

<section>
    <div class="container">
        <div class="row">
            <div class="col-md-6">One</div>
            <div class="col-md-6">Two</div>
        </div>
        <div class="row">
            <div class="col-md-4 col-md-offset-4">Three</div>
            <div class="col-md-4">Four</div>
        </div>
    </div>
</section>

This does not render right using bootstrap with HotTowel. You don't get the expected bootstrap table layout.

If I do this:

<body>
    <div class="container">
        <div class="row">
            <div class="col-md-6">One</div>
            <div class="col-md-6">Two</div>
        </div>
        <div class="row">
            <div class="col-md-4 col-md-offset-4">Three</div>
            <div class="col-md-4">Four</div>
        </div>
    </div>
</body>

in a plain html page in the same project, the bootstrap table layout is as expected.

Am I missing something that HotTowel needs to use bootstrap for a view layout? The bootstrap css and js files are all referenced in HotTowel's index.cshtml.

Was it helpful?

Solution

You can use bootstrap in a HotTowel view. The issue may come from your bootstrap loading scenario.

  • Have a look to your bundleConfig : bootstrap may be defined after jquery.
  • Make sure you correctly render the bundle containing bootstrap in your index.cshtml.
  • Make sure bootstrap is not loaded more than once.

OTHER TIPS

Mystery solved. I was trying to use the new col* classes for layout and HotTowel is only using version 2.3.2 of bootstrap. I switched to using the span* classes and everything started working.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top