Centrar sitio web receptivo usando bootstrap 3

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


 <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>
             <a class="brand" href="index.html"> </a>

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

<div class="container body-content">

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

above not working

preguntado el 28 de mayo de 14 a las 11:05

Intentó margin:auto 0px de su .container? -

Your problem is hard to follow, are you able to create a demo page - perhaps on jsFiddle or another such site? -

bootply.com/oVo8zfiVkS added i want navbar looklike above provide url navbar -

2 Respuestas

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.

contestado el 28 de mayo de 14 a las 12:05

No utilice .containernested in code. must use only one container y use .row for multiple nested column.

contestado el 30 de mayo de 14 a las 07:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.