php - 发送 php 表单后,如何编辑“新”确认页面?
问题描述
发送 PHP 联系表单并显示确认消息:我需要白色背景的 div 为整列。如果我在消息上添加边距,它会破坏如图所示的布局。我仍然围绕着 PHP 逻辑在交互方面的结构如何,不确定在哪里调整它并解决问题。
我的代码结构如下:
<div id="whitebox" class="whitebox">
<div class="text-center orange-navbar">
<nav role="navigation">
<ul class="navcen nav nav-pills" >
<li role="presentation"><a href="index.html">Home</a></li>
<li role="presentation"><a href="portfolio.html">Portfolio</a></li>
<li class="active" role="presentation"><a href="contact.html">Contact</a></li>
</ul>
</nav>
</div>
<?php if(!empty($emailSent)): ?>
<div class="col-md-6 col-md-offset-3">
<div class="alert alert-success text-center"><?php echo $config->get('messages.success'); ?></div>
</div>
<?php else: ?>
<?php if(!empty($hasError)): ?>
<div class="col-md-5 col-md-offset-4">
<div class="alert alert-danger text-center"><?php echo $config->get('messages.error'); ?></div>
</div>
<?php endif; ?>
解决方案
将此添加到您的CSS:
.whitebox {
height: 100vh;
}
这将使您的whitebox
div 的高度为视口的 100%。
推荐阅读
- java - 我应该设置哪些参数来在 Spark 1.6 中处理 100 GB 的 Csv
- sql-server - MS SQL 中外键的负值
- swift - Float 和 Double 算术不返回准确的结果?
- ios - 存储 AVURLAsset 的 ckc 关键数据而不播放视频
- flutter - Flutter:使用自定义图形(纹理图集)
- kotlin - Kotlin - 应用程序在 ObjectInputStream 行启动时崩溃
- django - 密码重置自定义验证消息
- javascript - 简单的求和函数测试不能开玩笑
- nginx - 如何防止ffmpeg转码从低质量到高质量?
- c# - Entity Framework Core - 使用接口作为参数的表达式树