如何保证table或div不因插入form而改变大小
一.问题描述:jsp /html 中,在table或div插入form后,表格或div变大了,影响了原来的布局
二.解放方法:
此时设置table <td>或div的height, width是不起作用的,如下方法可以解决
方法一:最简单,在td中设置:overflow: hidden, 这样即使超出的部分也不会显示。
<td height="25px" style="overflow: hidden">
或 <div style=" overflow:hidden ;100px; height:25px; float: left;" >
div的样式加个overflow:hidden;,这样即便div中内容超了,也不会让div变大。
方法二:直接对form 设置其padding和margin属性,或在CSS或直接设置
css: form{ padding: 0px; margin: 0px; }
直接设置;
<html:form action="/adminDeleteNews.do" method="post" style="padding: 0px;margin: 0px;" >
三.实践证明,这样做达到目的了。
分享到:
相关推荐
<form method="post" action="result.jsp" name="form1"> <div align="center"> </div> <table width="670" border="0" height="401" align="center"> <tbody><tr> <div align="center"> ...
form method="post" action=""> <table width="400" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000"> <td bgcolor="#FFFFFF"><div align="center">查询用户</div> ...
alert(myform.elements[i].title+"不能为空!"); myform.elements[i].focus(); return false; } } } function opendialog(){ if(form1.songName.value=="" || form1.singer.value==""){ alert("请...
<div align="center"><strong><font face="华文楷体"><a href="messagelist.jsp" target="_blank" class="STYLE21">游客留言板</a></font></strong></div> <tr> <td width="56" height="18" bgcolor="#CCFF00">...
<form id="form1" name="form1" method="post" action="shuju.jsp"> <div align="center"> <table width="1080" height="178" border="1"> <tr> <td width="153" height="172"><img src="../image/logo.jpg" alt=...
<form action="dl-conf.jsp" method="post"> <table width="404" height="193"> <td width="109" height="30" colspan="1"><strong>用户登录</strong></td> <td><div align="left">用 户 名:</div...
本文实例为大家分享了bootstrap制作jsp页面的具体代码,告诉大家如何让table显示选中,供大家参考,具体内容如下 <%@ page language=java contentType=text/html; charset=UTF-8 pageEncoding=UTF-8%> <&...
JSP Simple Examples Index 1. Creating a String In jsp we create a string as we does in a java. In jsp we can declare it inside the declaration directive or a scriptlet directive. String Length In ...
<form name="form1" method="post" action="DepAddSave.jsp" onSubmit="return check();"> <table width="500" height="104" border="1" align="center" cellpadding="3" cellspacing="1"> 新增部门资料 ...
5.4.html 改变div的内容。 5.5.html 获取表格第1行。 5.6.html 获取表格的某列。 5.7.html 修改表格的内容。 5.8.html 无刷新效果更改表格的某行。 第6章(\c06) 示例描述:介绍JavaScript与...
asp基础HTML语言 用来描述网页/网站布局的标签语言 asp.net jsp php 1/必要格式 <html> <head> <title>欢迎来到学习HTML语言</title> </head> <body> 123456 </body...
//shop_cart.jsp <%@ page contentType="text/html;charset=gb2312"%> *" %> <jsp:useBean id="bka" scope="page" class="shop.bka" /> String product_type; String action; int product_id; int curpage;...
*" pageEncoding="GBK"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <html> 网上订餐系登录系统 ... <div><c:import url="BodyFoot.jsp"></c:import></div> </html>
<td valign="top"><form id="form1" name="form1" method="post" action="loginaction.do"> <table width="400" border="0" align="center" cellpadding="0" cellspacing="0"> <td colspan="2"><div align=...
form id="ec" action="delsave.jsp" method="post" check()"> <div class="eXtremeTable"> <table id="ec_table" border="0" cellspacing="0" cellpadding="0" class="tableRegion" width="100%"> ;"> ...
<form name="form1" method="post" action=""> 手机列表 <table width="80%" border="1" cellspacing="1" cellpadding="1"> 编号 ...
<form action="addphoneAction.jsp" method="post"> <table border="1"> 类型: 品牌: <td> ...
1.如果是在jsp 中: <html:regionselect></html:regionselect> 2.如果是在Freemarker的html中: RegionSelect= "com.enation.app.base.component.widget.regions.RegionSelectDirective"?new()> ...
编辑器 FCKeditor2.4 使用说明 ...问题三: 上传时新建的中文目录全部乱码 虽然上传到服务器上的文件名正常,但在JSP页面点下载链接时文件名乱码导致不能正常下载 查找资料:TOMCAT 链接参数有中文时,乱码解决方法 ...
<form name="form1" method="post" action="buy.jsp"> <tr> 图书名: <td><%= bk.getBookName() %> <tr> 作者: <td><%= bk.getAuthor() %> <tr> 所属类别: <td><%= bk.getClassname() %> ...