我一直在使用Bootstrap 3.3.1开发网站。我的一个页面有一个注册表单。出于某种原因,这种形式变得非常长,超过1000px到页面底部。我没有更改此页面使用的任何代码,因为我上次检查它是好的。
这就是网站现在的样子。
我对如何发生这种情况感到困惑。任何帮助都会有很大的帮助。
.btn-file {
position: relative;
overflow: hidden;
}
.child {
text-align: left;
}
.margintop {
margin-top: 10px;
}
.chart-legend li {
display: inline;
padding-right: 10px;
}
.chart-legend li span {
display: inline-block;
width: 12px;
height: 12px;
margin-right: 2px;
}
.chart-legend > ul {
list-style-type: none;
padding-left: 0px;
}
.dropspan {
width: 80px;
}
.modal-header-success {
color: #fff;
padding: 9px 15px;
border-bottom: 1px solid #eee;
background-color: #5cb85c;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
.modal-header-warning {
color: #fff;
padding: 9px 15px;
border-bottom: 1px solid #eee;
background-color: #f0ad4e;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
.modal-header-danger {
color: #fff;
padding: 9px 15px;
border-bottom: 1px solid #eee;
background-color: #d9534f;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
.modal-header-info {
color: #fff;
padding: 9px 15px;
border-bottom: 1px solid #eee;
background-color: #5bc0de;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
.modal-header-primary {
color: #fff;
padding: 9px 15px;
border-bottom: 1px solid #eee;
background-color: #428bca;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
canvas {
margin-left: -15px;
}
html,
body {
height: 100%;
/* The html and body elements cannot have any padding or margin. */
}
/* Wrapper for page content to push down footer */
.wrap {
min-height: 100%;
height: auto;
/* Negative indent footer by its height */
margin: 0 auto -40px;
/* Pad bottom by footer height */
padding: 0 0 40px;
}
/* Set the fixed height of the footer here */
#footer {
height: 40px;
background-color: #f5f5f5;
}
@media print {
a[href]:after {
content: none !important;
}
.col1 {
display: none;
}
}
.actionsdrop > .edit > a:hover,
.actionsdrop > .edit > a:focus {
background-image: none !important;
color: white;
}
.actionsdrop > .edit > a:hover,
.actionsdrop > .edit > a:focus {
background-color: #357ebd !important;
color: white;
}
.actionsdrop > .delete > a:hover,
.actionsdrop > .delete > a:focus {
background-image: none !important;
color: white;
}
.actionsdrop > .delete > a:hover,
.actionsdrop > .delete > a:focus {
background-color: #d9534f !important;
color: white;
}
.btn-file input[type=file] {
position: absolute;
top: 0;
right: 0;
min-width: 100%;
min-height: 100%;
font-size: 100px;
text-align: right;
filter: alpha(opacity=0);
opacity: 0;
outline: none;
background: white;
cursor: inherit;
display: block;
}
.form-group.required label:after {
content: " *";
color: red;
}
.container {
padding-top: 15px;
}
.status {
color: #ffffff;
margin-top: 30px;
margin-right: 10px;
text-align: right;
}
.form-inline > * {
margin: 5px 10px;
}
.inner-shadow {
box-shadow: inset 0px 0px 55px -20px #000000;
-webkit-box-shadow: inset 0px 0px 55px -20px #000000;
-moz-box-shadow: inset 0px 0px 55px -20px #000000;
-o-box-shadow: inset 0px 0px 55px -20px #000000;
}
.navbar .divider-vertical {
height: 50px;
margin: 0 9px;
border-right: 1px solid #ffffff;
border-left: 1px solid #f2f2f2;
}
.navbar-inverse .divider-vertical {
border-right-color: #222222;
border-left-color: #111111;
}
.glyphicon.glyphicon-cog {
font-size: 20px;
padding: 0px;
}
.glyphicon.glyphicon-inbox {
font-size: 15px;
padding: 0px;
}
.loginerrors {
color: #cc5f3b;
height: auto;
text-align: center;
}
.fullheight {
height: 100%;
margin: auto;
}
.blue {
background-color: #357ebd;
}
@media (min-width: 768px) {
.colw {
width: 80px;
}
.modal-content {
margin-top: 150px;
}
.mtop {
margin-top: 60px;
}
.navbar .navbar-nav {
display: inline-block;
float: none;
vertical-align: top;
}
.navbar .navbar-collapse {
text-align: center;
}
.navbar-center li {
width: 155px;
}
#toggle7 {
height: 50px;
}
.navbar-center {
padding-right: 90px;
}
.actioncol1 {
width: 70px;
}
.actioncol2 {
width: 120px;
}
.btn-edit,
.btn-delete {
width: 49px;
}
}
.logo {
font-size: 20px;
padding-top: 7px;
}
#addorgtabbtn {
padding-right: 5px;
padding-left: 5px;
}
@media (max-width: 768px) {
.dropspan:before {
top: 8px;
margin-left: 5px;
height: 16px;
width: 16px;
display: block;
color: white;
border: 2px solid white;
border-radius: 16px;
text-align: center;
line-height: 14px;
box-shadow: 0 0 3px #444;
box-sizing: content-box;
background-color: #31b131;
background-color: #5bc0de !important;
left: 10px !important;
top: 6px !important;
}
.smsize {
font-size: 13px !important;
}
.dataTables_filter {
font-size: 0px;
}
.dataTables_length {
font-size: 0px;
}
.modal-content {
margin-top: 80px;
}
.navbar-brand {
text-align: center;
}
.logo {
position: absolute;
width: 100%;
left: 0;
text-align: center;
margin: auto;
}
#logoimg {
display: none;
}
.actioncol1 {
width: 50px;
}
.btn-edit,
.btn-delete {
width: 100%;
}
.hidecol {
display: none;
}
#addbox {
display: block;
margin-right: auto;
margin-left: auto;
}
#chevr {
display: none;
}
.nav-tabs li {
width: 33%;
}
.brand-centered {
position: absolute;
width: 100%;
left: 0;
top: 0;
text-align: center;
margin: auto;
height: 100%;
}
}
.panel.with-nav-tabs .panel-heading {
padding: 5px 5px 0 5px;
}
.panel.with-nav-tabs .nav-tabs {
border-bottom: none;
}
.panel.with-nav-tabs .nav-justified {
margin-bottom: -1px;
}
.with-nav-tabs.panel-default .nav-tabs > li > a,
.with-nav-tabs.panel-default .nav-tabs > li > a:hover,
.with-nav-tabs.panel-default .nav-tabs > li > a:focus {
color: #777;
}
.with-nav-tabs.panel-default .nav-tabs > .open > a,
.with-nav-tabs.panel-default .nav-tabs > .open > a:hover,
.with-nav-tabs.panel-default .nav-tabs > .open > a:focus,
.with-nav-tabs.panel-default .nav-tabs > li > a:hover,
.with-nav-tabs.panel-default .nav-tabs > li > a:focus {
color: #777;
background-color: #ddd;
border-color: transparent;
}
.with-nav-tabs.panel-default .nav-tabs > li.active > a,
.with-nav-tabs.panel-default .nav-tabs > li.active > a:hover,
.with-nav-tabs.panel-default .nav-tabs > li.active > a:focus {
color: #555;
background-color: #fff;
border-color: #ddd;
border-bottom-color: transparent;
}
.with-nav-tabs.panel-default .nav-tabs > li.dropdown .dropdown-menu {
background-color: #f5f5f5;
border-color: #ddd;
}
.with-nav-tabs.panel-default .nav-tabs > li.dropdown .dropdown-menu > li > a {
color: #777;
}
.with-nav-tabs.panel-default .nav-tabs > li.dropdown .dropdown-menu > li > a:hover,
.with-nav-tabs.panel-default .nav-tabs > li.dropdown .dropdown-menu > li > a:focus {
background-color: #ddd;
}
.with-nav-tabs.panel-default .nav-tabs > li.dropdown .dropdown-menu > .active > a,
.with-nav-tabs.panel-default .nav-tabs > li.dropdown .dropdown-menu > .active > a:hover,
.with-nav-tabs.panel-default .nav-tabs > li.dropdown .dropdown-menu > .active > a:focus {
color: #fff;
background-color: #555;
}
.with-nav-tabs.panel-success .nav-tabs > li > a,
.with-nav-tabs.panel-success .nav-tabs > li > a:hover,
.with-nav-tabs.panel-success .nav-tabs > li > a:focus {
color: #3c763d;
}
.with-nav-tabs.panel-success .nav-tabs > .open > a,
.with-nav-tabs.panel-success .nav-tabs > .open > a:hover,
.with-nav-tabs.panel-success .nav-tabs > .open > a:focus,
.with-nav-tabs.panel-success .nav-tabs > li > a:hover,
.with-nav-tabs.panel-success .nav-tabs > li > a:focus {
color: #3c763d;
background-color: #d6e9c6;
border-color: transparent;
}
.with-nav-tabs.panel-success .nav-tabs > li.active > a,
.with-nav-tabs.panel-success .nav-tabs > li.active > a:hover,
.with-nav-tabs.panel-success .nav-tabs > li.active > a:focus {
color: #3c763d;
background-color: #fff;
border-color: #d6e9c6;
border-bottom-color: transparent;
}
.with-nav-tabs.panel-success .nav-tabs > li.dropdown .dropdown-menu {
background-color: #dff0d8;
border-color: #d6e9c6;
}
.with-nav-tabs.panel-success .nav-tabs > li.dropdown .dropdown-menu > li > a {
color: #3c763d;
}
.with-nav-tabs.panel-success .nav-tabs > li.dropdown .dropdown-menu > li > a:hover,
.with-nav-tabs.panel-success .nav-tabs > li.dropdown .dropdown-menu > li > a:focus {
background-color: #d6e9c6;
}
.with-nav-tabs.panel-success .nav-tabs > li.dropdown .dropdown-menu > .active > a,
.with-nav-tabs.panel-success .nav-tabs > li.dropdown .dropdown-menu > .active > a:hover,
.with-nav-tabs.panel-success .nav-tabs > li.dropdown .dropdown-menu > .active > a:focus {
color: #fff;
background-color: #3c763d;
}
tbody > tr > td:first-child:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th:first-child:before {
background-color: #5bc0de !important;
left: 10px !important;
top: 6px !important;
}
.modal-backdrop {
z-index: 0 !important;
}
<?php $_SESSION[ "page"]='Register' ; ?>
<html lang="en">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>GivingTree |
<?php echo $_SESSION[ 'page']; ?>
</title>
<link href="css/datepicker.css" rel="stylesheet">
<link href="css/main.css" rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<link href="//cdn.datatables.net/plug-ins/1.10.7/integration/bootstrap/3/dataTables.bootstrap.css" rel="stylesheet">
<link href="//cdn.datatables.net/responsive/1.0.6/css/dataTables.responsive.css" rel="stylesheet">
<link rel="apple-touch-icon" sizes="57x57" href="img/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="img/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="img/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="img/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="img/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="img/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="img/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="img/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="img/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="img/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="img/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="img/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="img/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="/manifest.json">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-TileImage" content="img/mstile-144x144.png">
<meta name="theme-color" content="#ffffff">
<style type="text/css">
.container {
padding-bottom: 30px;
}
.btn-file {
position: relative;
overflow: hidden;
}
.btn-file input[type=file] {
position: absolute;
top: 0;
right: 0;
min-width: 100%;
min-height: 100%;
font-size: 100px;
text-align: right;
filter: alpha(opacity=0);
opacity: 0;
background: red;
cursor: inherit;
display: block;
}
input[readonly] {
background-color: white !important;
cursor: text !important;
}
</style>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- primary: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="blue">
<div id="wrap" class="wrap">
<nav class="navbar navbar-default" style="border-radius:0px;">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<a class="navbar-brand pull-left" href="index.php" style="padding-top:9px;">
<img src="logo.png" width="28px" height="28px" style="float:left" />
<div class="logo" style="float:left;color:#695b4e">GivingTree</div>
</a>
<button type="button" class="navbar-toggle collapsed visible-xs visible-sm" data-toggle="collapse" data-target="#main-collapse" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- Collects for toggling -->
<div class="collapse navbar-collapse text-center" id="main-collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="index.php?login"><span class="fa fa-sign-in"></span> Login</a>
</li>
<li class="active"><a href="register.php"><span class="fa fa-edit"></span> Register</a>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container-fluid -->
</nav>
<div class="container">
<div class="row">
<div class="col col-xs-12 col-md-6 col-md-offset-3 mtop">
<div class="panel panel-default">
<div class="panel-heading text-center">
<h4>GivingTree | <span class="text-muted">Register</span></h4>
</div>
<form method="post" action="register.php" name="registerform">
<div class="panel-body">
<div class="form-group col col-md-12">
<div class="loginerrors">
<?php // show potential errors / feedback (from registration object) if (isset($registration)) { if ($registration->errors) { foreach ($registration->errors as $error) { echo "<span class='fa fa-info-circle'> </span> "; echo $error; } } if ($registration->messages) { foreach ($registration->messages as $message) { echo $message; } } } ?>
</div>
</div>
<div class="form-group col col-xs-12">
<label for="user_name">Name</label>
<input id="login_input_username" class="login_input form-control" type="text" pattern="[a-zA-Z0-9 ]+" name="user_name" placeholder="Name" required />
</div>
<div class="form-group col col-xs-12">
<label for="user_email">Email</label>
<input id="login_input_email" class="login_input form-control" type="email" name="user_email" placeholder="Email" required />
</div>
<div class="form-group col col-xs-12" id="pwd-container">
<div class="row">
<div class="input group col col-sm-6">
<label for="password">Password</label>
<input name="user_password_new" type="password" class="form-control col col-sm-12" id="password" placeholder="Password" />
<div class="pwstrength_viewport_progress">
<div class="progress-bar"><span class="password-verdict"></span>
</div>
</div>
</div>
<div class="input group col col-sm-6">
<label for="user_password_repeat">Repeat Password</label>
<input id="user_password_repeat" class="login_input form-control col col-sm-12" type="password" name="user_password_repeat" placeholder="Confirm Password" pattern=".{6,}" required autocomplete="off" />
</div>
</div>
</div>
</div>
<div class="panel-footer">
<a href="index.php?login" class="btn btn-default">Logdin</a>
<input type="submit" class="btn btn-primary pull-right" name="register" value="Register" />
</div>
</form>
</div>
</div>
</div>
</div>
<?php include 'footer.php'; ?>
</body>
</html>
答案 0 :(得分:0)
我最终浏览了网站上运行的所有代码部分。不知何故,我的谷歌分析代码导致了它。我不确定为什么,为什么它不影响网站的任何其他部分,但一旦我删除它,一切都恢复正常。关于为什么会发生这种情况的任何想法?
答案 1 :(得分:0)
在bootstrap.min.css中的此规则中找到它:
.progress-bar {
background-color: #337ab7;
box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.15) inset;
color: #fff;
float: left;
font-size: 12px;
height: 100%;
line-height: 20px;
text-align: center;
transition: width 0.6s ease 0s;
width: 0;
}
height: 100%;
是原因。您可以使用:
.progress-bar { height: auto; }