搜索
首页web前端html教程我的页面上下2部分在不同分辨率的机器里高度不同_html/css_WEB-ITnose

我的页面上下2部分在不同分辨率的机器里高度不同,怎么设置比例让上面的表格能任何时候都全部显示?

现在在有的机器里第4行显示不出来,因为表格的高度在小分辨率的机器里就缩小了。

还有分辨率改了后,表格里的文字也不齐了,有的标签在文本框上面,有的在左边,请问怎么调整?

html代码如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>    <head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>aaa</title></head><body class="bodyWithBorder">		<form name="templateAdd">			<div class="topToolBar">				<div class="toolGroup" style="float: left;"><table width="100%" border="1">  <tr>    <td><label for="security_organization_id"						style="padding-right: 3px; margin-left: 10px; font-size: 12px;">流水号</label>      <input name="text" type="text" class="table_top_text" id="BOSS_ID" value=""/></td>    <td><label for="Problem"						style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号流水号</label>      <input name="text10" type="text" class="table_top_text" id="input_Problem" value=""/></td>    <td><label for="Brand"						style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水</label>      <input name="text5" type="text" class="table_top_text" id="input_brand" value=""/></td>    <td><label for="capesname"					style="padding-right: 3px; margin-left: 10px; font-size: 12px;"">流水号流水</label>      <input name="text8" type="text" class="table_top_text" id="input_ReCount" value=""/></td>    <td><label for="accept_start" style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号流水号</label>      <input name="text152" type="text" class="table_top_text" id="input_AcceptStart" value=""/></td>    <td rowspan="4"><input name="button" type="button" class="button_middle2" id="searchButton" style="margin-left: 20px;" onclick="checkParam()"						onmouseover="this.className='button_middle_hover'"						onmouseout="this.className='button_middle2'"						value="搜索" />      <input name="button" type="button" class="button_middle2" id="resetButton"						style="margin-left: 20px;" onclick="clearForm('templateAdd')"						onmouseover="this.className='button_middle_hover'"						onmouseout="this.className='button_middle2'"						value="重置" /></td>  </tr>  <tr>    <td><label for="bomc_id"					style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号流水</label>      <input name="text2" type="text" class="table_top_text" id="input_BOMC" value=""/></td>    <td><label for="deal_type"						style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号流</label>      <input name="text11" type="text" class="table_top_text" id="input_deal" value=""/></td>    <td><label for="Product"						style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号流水</label>      <input name="text6" type="text" class="table_top_text" id="input_Product" value=""/></td>    <td><label for="service_type"						style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号流水号</label>      <input name="text12" type="text" class="table_top_text" id="input_Service" value=""/></td>    <td><label for="accept_end" style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号</label>      <input name="text153" type="text" class="table_top_text" id="input_AcceptEnd" value=""/></td>  </tr>  <tr>    <td><label for="Accept_id"						style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号流水号</label>      <input name="text3" type="text" class="table_top_text" id="input_Accept" value=""/></td>    <td><label for="Overtime"						style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号流</label>      <input name="text9" type="text" class="table_top_text" id="input_Overtime" value=""/></td>    <td><label for="log"						style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号流</label>      <input name="text13" type="text" class="table_top_text" id="input_log" value=""/></td>    <td><label for="WorkGroup"						style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号流水号</label>      <input name="text15" type="text" class="table_top_text" id="input_workgroup" value=""/></td>    <td><label for="deal_start" style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号</label>      <input name="text154" type="text" class="table_top_text" id="input_DealStart" value=""/></td>  </tr>  <tr>    <td><label for="User_Name"						style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号</label>      <input name="text4" type="text" class="table_top_text" id="input_Username" value=""/></td>    <td><label for="resperson_id"						style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号</label>      <input name="text7" type="text" class="table_top_text" id="input_Status" value=""/></td>    <td><label for="Person" style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号</label>      <input name="text16" type="text" class="table_top_text" id="input_person" value=""/>    </td>    <td><label for="Solution"						style="padding-right: 3px; margin-left: 10px; font-size: 12px;"">流水号流水号</label>      <input name="text14" type="text" class="table_top_text" id="input_Solution" value=""/>		</td>    <td><label for="deal_end" style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号:</label>      <input name="text155" type="text" class="table_top_text" id="input_DealEnd" value=""/></td>  </tr></table>				</div>							<div style="margin-top: 0px;">				<center>					<Iframe name="tt" src="http://www.baidu.com" width="100%" height="350px" marginwidth="1" marginheight="1"						scrolling="yes" frameborder="0"></iframe>				</center>			</div>		</form>	</body></html>


回复讨论(解决方案)

用 js指定两个div的高度即可

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml">    <head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>aaa</title><style type="text/css">body {overflow:hidden;margin:0;padding:0;width:100%;height:100%;}.topToolBar {position:absolute;left:0;top:0;right:0;width:100%;height:204px;}.bottom {position:absolute;left:0;top:204px;right:0;width:100%;bottom:0;border:1px solid red;}.bottom iframe {position:absolute;bottom:0px;left:0px;top:0px;right:0px;}</style></head><body class="bodyWithBorder" scroll=no>		<form name="templateAdd">			<div class="topToolBar"><table width="100%" border="1">  <tr>    <td><label for="security_organization_id"						style="padding-right: 3px; margin-left: 10px; font-size: 12px;">流水号</label>      <input name="text" type="text" class="table_top_text" id="BOSS_ID" value=""/></td>    <td><label for="Problem"						style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号流水号</label>      <input name="text10" type="text" class="table_top_text" id="input_Problem" value=""/></td>    <td><label for="Brand"						style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水</label>      <input name="text5" type="text" class="table_top_text" id="input_brand" value=""/></td>    <td><label for="capesname"					style="padding-right: 3px; margin-left: 10px; font-size: 12px;"">流水号流水</label>      <input name="text8" type="text" class="table_top_text" id="input_ReCount" value=""/></td>    <td><label for="accept_start" style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号流水号</label>      <input name="text152" type="text" class="table_top_text" id="input_AcceptStart" value=""/></td>    <td rowspan="4"><input name="button" type="button" class="button_middle2" id="searchButton" style="margin-left: 20px;" onclick="checkParam()"						onmouseover="this.className='button_middle_hover'"						onmouseout="this.className='button_middle2'"						value="搜索" />      <input name="button" type="button" class="button_middle2" id="resetButton"						style="margin-left: 20px;" onclick="clearForm('templateAdd')"						onmouseover="this.className='button_middle_hover'"						onmouseout="this.className='button_middle2'"						value="重置" /></td>  </tr>  <tr>    <td><label for="bomc_id"					style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号流水</label>      <input name="text2" type="text" class="table_top_text" id="input_BOMC" value=""/></td>    <td><label for="deal_type"						style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号流</label>      <input name="text11" type="text" class="table_top_text" id="input_deal" value=""/></td>    <td><label for="Product"						style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号流水</label>      <input name="text6" type="text" class="table_top_text" id="input_Product" value=""/></td>    <td><label for="service_type"						style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号流水号</label>      <input name="text12" type="text" class="table_top_text" id="input_Service" value=""/></td>    <td><label for="accept_end" style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号</label>      <input name="text153" type="text" class="table_top_text" id="input_AcceptEnd" value=""/></td>  </tr>  <tr>    <td><label for="Accept_id"						style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号流水号</label>      <input name="text3" type="text" class="table_top_text" id="input_Accept" value=""/></td>    <td><label for="Overtime"						style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号流</label>      <input name="text9" type="text" class="table_top_text" id="input_Overtime" value=""/></td>    <td><label for="log"						style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号流</label>      <input name="text13" type="text" class="table_top_text" id="input_log" value=""/></td>    <td><label for="WorkGroup"						style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号流水号</label>      <input name="text15" type="text" class="table_top_text" id="input_workgroup" value=""/></td>    <td><label for="deal_start" style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号</label>      <input name="text154" type="text" class="table_top_text" id="input_DealStart" value=""/></td>  </tr>  <tr>    <td><label for="User_Name"						style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号</label>      <input name="text4" type="text" class="table_top_text" id="input_Username" value=""/></td>    <td><label for="resperson_id"						style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号</label>      <input name="text7" type="text" class="table_top_text" id="input_Status" value=""/></td>    <td><label for="Person" style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号</label>      <input name="text16" type="text" class="table_top_text" id="input_person" value=""/>    </td>    <td><label for="Solution"						style="padding-right: 3px; margin-left: 10px; font-size: 12px;"">流水号流水号</label>      <input name="text14" type="text" class="table_top_text" id="input_Solution" value=""/>		</td>    <td><label for="deal_end" style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号:</label>      <input name="text155" type="text" class="table_top_text" id="input_DealEnd" value=""/></td>  </tr></table>				</div><div class='bottom'>					<Iframe name="tt" src="http://www.baidu.com" width="100%" height="100%" marginwidth="1" marginheight="1"						scrolling="yes" frameborder="0"></iframe></div>		</form>	</body></html>

楼上真是好心人啊!

不过这个表格里每个标签和文本框的位置还没对齐,有的标签在文本框上面,有的在左边

你把搜索重宽带调小点,然后单元格宽度改下。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml">    <head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>aaa</title><style type="text/css">body {overflow:hidden;margin:0;padding:0;width:100%;height:100%;}.topToolBar {position:absolute;left:0;top:0;right:0;width:100%;height:204px;}.bottom {position:absolute;left:0;top:204px;right:0;width:100%;bottom:0;border-top:1px solid red;}.bottom iframe {position:absolute;bottom:0px;left:0px;top:0px;right:0px;}.table_top_text {width:100%;}</style> </head> <body class="bodyWithBorder" scroll=no>        <form name="templateAdd">            <div class="topToolBar"><table width="100%" border="0">  <tr>    <td nowrap align=right><label for="security_organization_id"                        style="padding-right: 3px; margin-left: 10px; font-size: 12px;">流水号</label></td><td width="10%">      <input name="text" type="text" class="table_top_text" id="BOSS_ID" value=""/></td>    <td nowrap align=right><label for="Problem"                        style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号流水号</label></td><td width="10%">      <input name="text10" type="text" class="table_top_text" id="input_Problem" value=""/></td>    <td nowrap align=right><label for="Brand"                        style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水</label></td><td width="10%">      <input name="text5" type="text" class="table_top_text" id="input_brand" value=""/></td>    <td nowrap align=right><label for="capesname"                    style="padding-right: 3px; margin-left: 10px; font-size: 12px;">流水号流水</label></td><td width="10%">      <input name="text8" type="text" class="table_top_text" id="input_ReCount" value=""/></td>    <td nowrap align=right><label for="accept_start" style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号流水号</label></td><td width="10%">      <input name="text152" type="text" class="table_top_text" id="input_AcceptStart" value=""/></td>    <td rowspan="4"><input name="button" type="button" class="button_middle2" id="searchButton" style="margin-left: 20px;" onclick="checkParam()"                        onmouseover="this.className='button_middle_hover'"                        onmouseout="this.className='button_middle2'"                        value="搜索" />      <input name="button" type="button" class="button_middle2" id="resetButton"                        style="margin-left: 20px;" onclick="clearForm('templateAdd')"                        onmouseover="this.className='button_middle_hover'"                        onmouseout="this.className='button_middle2'"                        value="重置" /></td>  </tr>  <tr>    <td nowrap align=right><label for="bomc_id"                    style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号流水</label></td><td width="10%">      <input name="text2" type="text" class="table_top_text" id="input_BOMC" value=""/></td>    <td nowrap align=right><label for="deal_type"                        style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号流</label></td><td width="10%">      <input name="text11" type="text" class="table_top_text" id="input_deal" value=""/></td>    <td nowrap align=right><label for="Product"                        style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号流水</label></td><td width="10%">      <input name="text6" type="text" class="table_top_text" id="input_Product" value=""/></td>    <td nowrap align=right><label for="service_type"                        style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号流水号</label></td><td width="10%">      <input name="text12" type="text" class="table_top_text" id="input_Service" value=""/></td>    <td nowrap align=right><label for="accept_end" style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号</label></td><td width="10%">      <input name="text153" type="text" class="table_top_text" id="input_AcceptEnd" value=""/></td>  </tr>  <tr>    <td nowrap align=right><label for="Accept_id"                        style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号流水号</label></td><td width="10%">      <input name="text3" type="text" class="table_top_text" id="input_Accept" value=""/></td>    <td nowrap align=right><label for="Overtime"                        style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号流</label></td><td width="10%">      <input name="text9" type="text" class="table_top_text" id="input_Overtime" value=""/></td>    <td nowrap align=right><label for="log"                        style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号流</label></td><td width="10%">      <input name="text13" type="text" class="table_top_text" id="input_log" value=""/></td>    <td nowrap align=right><label for="WorkGroup"                        style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号流水号</label></td><td width="10%">      <input name="text15" type="text" class="table_top_text" id="input_workgroup" value=""/></td>    <td nowrap align=right><label for="deal_start" style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号</label></td><td width="10%">      <input name="text154" type="text" class="table_top_text" id="input_DealStart" value=""/></td>  </tr>  <tr>    <td nowrap align=right><label for="User_Name"                        style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号</label></td><td width="10%">      <input name="text4" type="text" class="table_top_text" id="input_Username" value=""/></td>    <td nowrap align=right><label for="resperson_id"                        style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号</label></td><td width="10%">      <input name="text7" type="text" class="table_top_text" id="input_Status" value=""/></td>    <td nowrap align=right><label for="Person" style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号</label></td><td width="10%">      <input name="text16" type="text" class="table_top_text" id="input_person" value=""/>    </td>    <td nowrap align=right><label for="Solution"                        style="padding-right: 3px; margin-left: 10px; font-size: 12px;">流水号流水号</label></td><td width="10%">      <input name="text14" type="text" class="table_top_text" id="input_Solution" value=""/>        </td>    <td nowrap align=right><label for="deal_end" style="padding-right: 3px; margin-left: 10px; font-size: 12px">流水号:</label></td><td width="10%">      <input name="text155" type="text" class="table_top_text" id="input_DealEnd" value=""/></td>  </tr></table>                </div><div class='bottom'>                    <Iframe name="tt" src="http://www.baidu.com" width="100%" height="100%" marginwidth="1" marginheight="1"                        scrolling="yes" frameborder="0"></iframe></div>        </form>    </body></html>

 a 和 b
关系  a在b上面 上下关系

要求 a全部显示

那么 我可以理解 a什么都不做  b根据自然位置放置就可以了

声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
为什么HTML标签对Web开发很重要?为什么HTML标签对Web开发很重要?May 02, 2025 am 12:03 AM

htmltagsareessentialforwebdevelopmentastheyandendenhancewebpages.1)heSdefinElayout,语义和互动性。2)SemantictagsiCtagSimproveCacsibilitieAndseo.3)pose poseriblesibilityAndseoandseo.3)poser

说明将一致的编码样式用于HTML标签和属性的重要性。说明将一致的编码样式用于HTML标签和属性的重要性。May 01, 2025 am 12:01 AM

一致的HTML编码风格很重要,因为它提高了代码的可读性、可维护性和效率。1)使用小写标签和属性,2)保持一致的缩进,3)选择并坚持使用单引号或双引号,4)避免在项目中混合使用不同风格,5)利用自动化工具如Prettier或ESLint来确保风格的一致性。

如何在 Bootstrap 4 中实现多项目轮播?如何在 Bootstrap 4 中实现多项目轮播?Apr 30, 2025 pm 03:24 PM

在Bootstrap4中实现多项目轮播的解决方案在Bootstrap4中实现多项目轮播并不是一件简单的事情。虽然Bootstrap...

deepseek官网是如何实现鼠标滚动事件穿透效果的?deepseek官网是如何实现鼠标滚动事件穿透效果的?Apr 30, 2025 pm 03:21 PM

如何实现鼠标滚动事件穿透效果?在我们浏览网页时,经常会遇到一些特别的交互设计。比如在deepseek官网上,�...

HTML 视频的播放控件样式怎么修改HTML 视频的播放控件样式怎么修改Apr 30, 2025 pm 03:18 PM

无法直接通过CSS修改HTML视频的默认播放控件样式。1.使用JavaScript创建自定义控件。2.通过CSS美化这些控件。3.考虑兼容性、用户体验和性能,使用库如Video.js或Plyr可简化过程。

在手机上使用原生select会带来哪些问题?在手机上使用原生select会带来哪些问题?Apr 30, 2025 pm 03:15 PM

在手机上使用原生select的潜在问题在开发移动端应用时,我们常常会遇到选择框的需求。通常情况下,开发者倾...

在手机上使用原生select的弊端是什么?在手机上使用原生select的弊端是什么?Apr 30, 2025 pm 03:12 PM

在手机上使用原生select的弊端是什么?在移动设备上开发应用时,选择合适的UI组件是非常重要的。许多开发者�...

如何使用Three.js和Octree优化房间内第三人称漫游的碰撞处理?如何使用Three.js和Octree优化房间内第三人称漫游的碰撞处理?Apr 30, 2025 pm 03:09 PM

使用Three.js和Octree优化房间内第三人称漫游的碰撞处理在Three.js中使用Octree实现房间内的第三人称漫游并添加碰�...

See all articles

热AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover

AI Clothes Remover

用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool

Undress AI Tool

免费脱衣服图片

Clothoff.io

Clothoff.io

AI脱衣机

Video Face Swap

Video Face Swap

使用我们完全免费的人工智能换脸工具轻松在任何视频中换脸!

热工具

mPDF

mPDF

mPDF是一个PHP库,可以从UTF-8编码的HTML生成PDF文件。原作者Ian Back编写mPDF以从他的网站上“即时”输出PDF文件,并处理不同的语言。与原始脚本如HTML2FPDF相比,它的速度较慢,并且在使用Unicode字体时生成的文件较大,但支持CSS样式等,并进行了大量增强。支持几乎所有语言,包括RTL(阿拉伯语和希伯来语)和CJK(中日韩)。支持嵌套的块级元素(如P、DIV),

安全考试浏览器

安全考试浏览器

Safe Exam Browser是一个安全的浏览器环境,用于安全地进行在线考试。该软件将任何计算机变成一个安全的工作站。它控制对任何实用工具的访问,并防止学生使用未经授权的资源。

螳螂BT

螳螂BT

Mantis是一个易于部署的基于Web的缺陷跟踪工具,用于帮助产品缺陷跟踪。它需要PHP、MySQL和一个Web服务器。请查看我们的演示和托管服务。

适用于 Eclipse 的 SAP NetWeaver 服务器适配器

适用于 Eclipse 的 SAP NetWeaver 服务器适配器

将Eclipse与SAP NetWeaver应用服务器集成。

VSCode Windows 64位 下载

VSCode Windows 64位 下载

微软推出的免费、功能强大的一款IDE编辑器