gpt4 book ai didi

php - 提交后出现错误结果 IE8 的错误 css

转载 作者:太空宇宙 更新时间:2023-11-04 04:21:54 25 4
gpt4 key购买 nike

当我尝试使用错误的凭据提交登录时,页面加载了错误的 CSS 样式。如果用户有事件帐户,我会检查 index.php,如果没有,我会包含 login.php 页面。当我删除顶部的 php 时,我没有收到任何错误,并且页面位于正确的 css 中。因此,总是在出现错误时,页面看起来与设计的完全不同。也许浏览器不加载 css?或完整的CSS?

<?php
// show negative messages
if ($account->errors) {
foreach ($account->errors as $error) {
echo $error;
}
}

?>

<!DOCTYPE html>
<html lang="en">
<head>
<!-- INITIALISE -->
<meta charset="utf-8">
<title>Sign in</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">

<!-- STYLESHEETS -->
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/bootstrap-responsive.css" rel="stylesheet">
<link href="css/main.css" rel="stylesheet" >

<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="js/html5shiv.js"></script>
<script src="js/respond.min.js"></script>
<![endif]-->

</head>
<body>
<div class="form-wrapper text-center">
<hr>
<form class="form-signin" role="form" action="index.php" name="loginform" method="post">
<h2 class="form-signin-heading">log in.</h2>
<input type="text" class="input-block-level" name="posted_username" placeholder="User">
<input type="password" class="input-block-level" name="posted_password" placeholder="Pass">
<button class="btn btn-small btn-danger" type="submit" name="login">Log in</button>
</form>
</div> <!-- /form-wrapper -->

<!-- BOOTSTRAP -->
<script src="js/jquery.js"></script>
<script src="js/bootstrap.js"></script>
</body>
</html>

最佳答案

您在打开之前将错误消息转储到页面中 <!DOCTYPE>/<html>标签,这是不允许的。这可能会触发 IE 以 Quirks 模式呈现页面,这基本上会将整个 CSS 呈现系统更改为旧式 IE6 风格的垃圾。

将错误消息移到 <body> 中更合适的位置区域,您可能会发现 css 神奇地开始更好地工作。

关于php - 提交后出现错误结果 IE8 的错误 css,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18919208/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com