我的登录页面与我的导航栏发生冲突,看不到它的顶部
My login page is being collided with my navbar and can't see the top portion of it
当我转到 localhost:3000/sign-in
(我的登录页面)时,我的登录表单与我的导航栏发生冲突。所以我看不到用facebook登录,但是我看到用google.
登录的红色条
我正在使用 useraccounts:bootstrap。
这是我的 index.html 文件:
<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>
<!-- /.navbar-collapse --> </div>
<!-- /.container --> </nav>
<div ui-view></div>
</body>
这是我的 routes.js 文件:
Router.route('/', function () {
this.render('index.html');
});
Router.route('/about');
Router.route('/contact');
Router.route('/home');
Router.route('/services');
AccountsTemplates.configureRoute('signIn');
如您所见,{{> atNavButton}}
是我在导航栏上的登录按钮。在路由文件中,AccountsTemplates.configureRoutes('signIn') 是该页面的路由。
我需要的只是让登录表单位于屏幕中间,以便我可以看到整个表单。
实时网页在这里:http://testbasic.meteor.com/sign-in
整个项目 github 位于此处:https://github.com/Aggr0vatE/testbasichelp
非常感谢您的帮助!
谢谢,
斯蒂芬
给你的 body 一个 padding-top 65-70px
body{
padding-top:70px;
}
为了在移动设备上运行良好,请添加:
@media (max-width: 979px) {
body {
padding-top: 0px;
}
}
此解决方案可能会影响您的某些布局。另一种简单的方法是使用 class:
navbar-static-top
当我转到 localhost:3000/sign-in
(我的登录页面)时,我的登录表单与我的导航栏发生冲突。所以我看不到用facebook登录,但是我看到用google.
我正在使用 useraccounts:bootstrap。
这是我的 index.html 文件:
<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>
<!-- /.navbar-collapse --> </div>
<!-- /.container --> </nav>
<div ui-view></div>
</body>
这是我的 routes.js 文件:
Router.route('/', function () {
this.render('index.html');
});
Router.route('/about');
Router.route('/contact');
Router.route('/home');
Router.route('/services');
AccountsTemplates.configureRoute('signIn');
如您所见,{{> atNavButton}}
是我在导航栏上的登录按钮。在路由文件中,AccountsTemplates.configureRoutes('signIn') 是该页面的路由。
我需要的只是让登录表单位于屏幕中间,以便我可以看到整个表单。
实时网页在这里:http://testbasic.meteor.com/sign-in
整个项目 github 位于此处:https://github.com/Aggr0vatE/testbasichelp
非常感谢您的帮助!
谢谢,
斯蒂芬
给你的 body 一个 padding-top 65-70px
body{
padding-top:70px;
}
为了在移动设备上运行良好,请添加:
@media (max-width: 979px) {
body {
padding-top: 0px;
}
}
此解决方案可能会影响您的某些布局。另一种简单的方法是使用 class:
navbar-static-top