html - Div 容器突然显示不正确 - 代码没有变化,是什么原因?
问题描述
正如标题所说,这里“参与者名字”的 div 容器及其搜索框突然显示得很奇怪。没有代码被触摸/更改等。
有趣的是,我在 CodePen 中运行它并且“正确”的外观显示在那里:
https://codepen.io/AYSCodePen/pen/poeQVzv
<!DOCTYPE html>
<div class="mar-bot30">
<div class="head-l">
<h2><em>A Y S</em></h2>
</div>
<div class="head-r">
<h2 class="inbl"><em>Plus</em></h2>
<a class="blueadminbutton" href=".">admin menu</a>
<a class="dkblueadminbutton mar-right30" href="/">main menu</a>
</div>
<br class="clr">
</div>
<hr>
<div class="row text-c">
<h3>Participant Search</h3>
</div>
<div class="row-third text-l">
<form method="post">
<select class="selectform" name="partselect">
<option value=""> - Participant first name - </option>
<option value="<?php echo $rowd['id']; ?>"><?php echo $rowd['FirstName']; ?> <?php echo $rowd['LastName']; ?></option>
</select>
<input type="submit" value="search" />
<input type="hidden" name="partfind" value="partdrop" />
</form>
</div>
<div class="row-third text-c">
<form method="post">
<input type="text" name="partndisnum" maxlength="9" placeholder=" - NDIS number - " />
<input type="submit" value="search" />
<input type="hidden" name="partfind" value="partndis" />
</form>
</div>
<div class="row-third text-r">
<form method="post">
<input type="text" name="partname" placeholder=" - part of name - " />
<input type="submit" value="search" />
<input type="hidden" name="partfind" value="partname" />
</form>
</div>
<div class="row-third text-c mar-top30">
<form method="post">
<input type="text" name="partid" placeholder=" - id number - " />
<input type="submit" value="search" />
<input type="hidden" name="partfind" value="partid" />
</form>
</div>
<hr>
有人知道为什么这个特定页面突然变得奇怪了吗?有人遇到过这样奇怪的事情吗?
解决方案
重新创建问题
<select class="selectform" name="partselect">
<option value=""> - Participant first name - </option>
<option value="xyz"> -Some Lengthy text to show up - </option> <!-- added this option -->
在CSS中
.selectform{
width: calc(100% - 70px);
}
其中 70px 是按钮的宽度
推荐阅读
- python - 在 Python 中将字符串十进制 ("anyValueD+anyValue) 转换为数值十进制
- javascript - 如何从内部回调返回 webRequest
- go - 在go中找不到来自url的公共文件
- r - Abline 不画线以绘制最小回归线
- javascript - 如何安装 NodeJS 包 node-parquet?
- python-3.x - 通过网络摄像头使用 OpenCV 捕获图像
- string - 是否可以在 Haskell 中将函数 putStrLn 应用于字符串列表的每个元素,让它打印到屏幕上,同时是非递归的
- javascript - 在消费者之外更新反应上下文?
- javascript - 在javascript中与Miss Ms串联全名
- elasticsearch - 过滤文档以匹配嵌套弹性搜索字段中的两个字段中的任何一个