0

How can i center a page like the below link with navbar down and layout at center in bootstrap 3 (asp.net mvc project)

[http://everthemes.com/demo/sellegance1/index.php?route=account/register]

 <div class="container center-block">
<div class="navbar navbar-default navbar-fixed-top bgnav">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
             <a class="brand" href="index.html"> </a>


        </div>
        <div class="navbar-collapse collapse">
            <ul class="nav navbar-nav">
            </ul>
        </div>
    </div>
</div>

<div class="container body-content">
    @RenderBody()

    <div id="footer">
         <hr />
    <footer>
        <p>&copy; @DateTime.Now.Year - dum.Inc</p>
    </footer>
        </div>
</div>

above not working

3
  • Tried margin:auto 0px on your .container?
    – TMH
    May 28, 2014 at 11:01
  • Your problem is hard to follow, are you able to create a demo page - perhaps on jsFiddle or another such site?
    – Kami
    May 28, 2014 at 11:49
  • bootply.com/oVo8zfiVkS added i want navbar looklike above provide url navbar May 28, 2014 at 12:38

2 Answers 2

0

ASP.net & MVC shouldn't really change how you use Bootstrap.

In CSS (Bootstrap is mostly a css template), you can: * Center text within a block - bootstrap uses the "text-center" class for this * Center the block itself - bootstrap uses the "center-block" class for this

It sounds like you want to center blocks, so the second would apply.

Also make sure you use "container" not "container-fluid" if you want a gutter on the left and the right of the page.

0
0

Do not use .containernested in code. must use only one container and use .row for multiple nested column.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.