Search code examples
htmltwitter-bootstrapmeteormeteor-accounts

My login page is being collided with my navbar and can't see the top portion of it


When I go to localhost:3000/sign-in (my sign in page), my login form is being collided with my navbar. So I can't see the login with facebook, but I see the red bar of login with google.

I am using useraccounts:bootstrap.

This is my index.html file:

<head>
    <meta content="text/html; charset=utf-8" http-equiv="content-type">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>ARIASCEND</title>
    <!-- Bootstrap Core CSS -->
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <!-- Custom CSS -->
    <link href="css/full-slider.css" rel="stylesheet">
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>    <![endif]-->
</head>
<body>
    <!-- Navigation -->
    <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
      <div class="container">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div style="background-color: #222222; text-align: right;" class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
            <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span>
            <span class="icon-bar"></span> <span class="icon-bar"></span> </button><a

            style="color: #333333;" class="navbar-brand" href="/home"><img

              style="position:absolute; top: 12px; left:25px; width: 151px; height: 51px;" title="logo" alt="logo" src="LOGO_Drone.jpg"

              href="/home"></a></div>
        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
          <ul class="nav navbar-nav">
            <br><li><a href="/about">About</a> </li>
            <li><a href="/services">Services</a> </li>
            <li><a href="/contact">Contact</a> </li>
          </ul>
          <br><ul class="nav navbar-nav navbar-right">
            {{> atNavButton}}<!-- here -->
          </ul>
          <!--<img style="position:absolute; top: 19px; right:25px; width: 100px; height: 50px;" title="login" alt="login" src="img/loginbtn.png" href="login.html" /> -->
        </div>
        &nbsp;&nbsp;
        <!-- /.navbar-collapse --> </div>
      <!-- /.container --> </nav>

      <div ui-view></div>
</body>

And this is my routes.js file:

Router.route('/', function () {
  this.render('index.html');
});

Router.route('/about');
Router.route('/contact');
Router.route('/home');
Router.route('/services');

AccountsTemplates.configureRoute('signIn');

As you can see, the {{> atNavButton}} is my login button at the navbar. And in the routes file the AccountsTemplates.configureRoutes('signIn') is the route for that page.

All I need help with would be just to make the login form go the the middle of the screen so that I can see the whole form.

The live web page is here: http://testbasic.meteor.com/sign-in

And the whole project github is located here: https://github.com/Aggr0vatE/testbasichelp

Help will be much appreciated!

Thank You,

Stephen


Solution

  • give your body a padding-top of 65-70px

    body{
        padding-top:70px;  
    }
    

    in order for this work well on mobile devices add this:

    @media (max-width: 979px) {
      body {
        padding-top: 0px;
      }
    }
    

    This solution may affect some of your layout. Another simple way is to use the class:

    navbar-static-top