<td>标签中valign="middle"与align="center"区别

本文详细介绍了HTML表格中元素的垂直(上下)和水平(左右)对齐方式,包括如何使用valign属性进行垂直对齐,如top、middle、bottom,以及如何使用align属性进行水平对齐,如LEFT、CENTER、RIGHT。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

valign 调格子中内容的垂向(上下)位置,valign=“top“上面,  valign=“middle“中间,或 valign=“bottom 下面。

align 调格子中内容的(左右)横向位置,align="LEFT“ 左边对齐, align="CENTER“中间 或 align="RIGHT“右边对齐。

转载于:https://www.cnblogs.com/liangyu/articles/2440944.html

下面这段是PHP5.6,如何改成PHP8.4? <?php require_once("include/global.php"); ?> <html> <head> <?php echo getMeta('gb') ?> <title><?php echo $_GLOBAL_CONF['SITE_NAME'] ?></title> </head> <link rel="stylesheet" href="/common.css" type="text/css"> <style> a {color:#616651} .img1 {border:solid 0 black} </style> <BODY link=#cc0000 leftMargin=0 topMargin=0 marginwidth="0" marginheight="0"> <?php require_once("include/header.php"); ?> <?php /* <div id=ad_dl01 style="z-index:1; visibility:visible; width:100px; position:absolute; top:115px; right:5px;"> <table border=0 cellspacing=0 cellpadding=0 width=300 style="table-layout:fixed; word-break:break-all" bgcolor=#d3e9FF> <tr> <td><iframe width="300" height="200" style="border: solid 1px black; width: 600px; height: 30px;" frameborder="0"></iframe></td> </tr> </table> </div> <script type=text/javascript> var step_ratio = 0.1; objs = new Array(); objs_x = new Array(); objs_y = new Array(); function addfollowmark(name, x, y) { i = objs.length; objs[i] = document.getElementById(name); objs_x[i] = x; objs_y[i] = y; } function followmark() { for(var i=0; i<objs.length; i++) { var fm = objs[i]; var fm_x = typeof(objs_x[i]) == 'string' ? eval(objs_x[i]) : objs_x[i]; var fm_y = typeof(objs_y[i]) == 'string' ? eval(objs_y[i]) : objs_y[i]; if (fm.offsetLeft != document.body.scrollLeft + fm_x) { var dx = (document.body.scrollLeft + fm_x - fm.offsetLeft) * step_ratio; dx = (dx > 0 ? 1 : -1) * Math.ceil(Math.abs(dx)); fm.style.left = fm.offsetLeft + dx; } if (fm.offsetTop != document.body.scrollTop + fm_y) { var dy = (document.body.scrollTop + fm_y - fm.offsetTop) * step_ratio; dy = (dy > 0 ? 1 : -1) * Math.ceil(Math.abs(dy)); fm.style.top = fm.offsetTop + dy; } fm.style.display = ''; } } addfollowmark("ad_dl01", "document.body.clientWidth-305", 115); setInterval('followmark()',20); </script> */ ?> <center> <table width=95% border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="2"><img src="images/tb_left.jpg" width="2" height="28" /></td> <td background="images/tb_bg.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <?php if($_SESSION['ss_admin']>0) echo " <form name=loginform method=post action=/login.php> <input type=hidden name=username value='$ss_name'> <input type=hidden name=password value='$ss_password'> "; ?> <tr> <td width="9"> </td> <td width=111><table border="0" cellspacing="0" cellpadding="0"> <tr> <td width="2"><img src="images/tb_sel_left.jpg" width="2" height="28" /></td> <td width="124" align="center" background="images/tb_sel_bg.jpg" class="selmenu">首页 Home</td> <td width="4"><img src="images/tb_sel_right.jpg" width="4" height="28" /></td> </tr> </table></td> <td align="center"><a href=/search.php class="menu">产品 Products</a></td> <td align="center"><span class="bai">|</span></td> <td align="center"><a href=/newest class="menu">新产品 New Products</a></td> <td align="center"><span class="bai">|</span></td> <?php /* <td align="center"><a href=/cart.php class="menu">Order</a></td> <td align="center"><span class="bai">|</span></td> <td align="center"><a href=/guestbook class="menu">Guestbook</a></td> <td align="center"><span class="bai">|</span></td>*/ ?> <td align="center"><a href=/help/about.php class="menu">联系我们 Contact us</a></td> <td align="center"><span class="bai">|</span></td> <td align="center"><a href=/register class="menu">注册 Register</a></td> <?php if($_SESSION['ss_admin']>0){ ?> <td align="center"><span class="bai">|</span></td> <td align="center"><a href=/admin class="menu" target=_blank>Admin</a> <input type=submit value=ReLogin style=cursor:hand></td> <?php } ?> <?php if($_SESSION['ss_userid']>0){ ?> <td align="center"><span class="bai">|</span></td> <td align="center"><a href=/bill class="menu">Bills</a></td> <td align="center"><span class="bai">|</span></td> <td align="center"><a href=/logout.php class="menu">退出 Logout</a></td> <?php }else{ ?> <td align="center"><span class="bai">|</span></td> <td align="center"><a href=/login.php class="menu">登录 Login</a></td> <?php } ?> </tr> <?php if($_SESSION['ss_admin']>0) echo " </form> "; ?> </table></td> <td width="2"><img src="images/tb_right.jpg" width="2" height="28" /></td> </tr> </table></td> </tr> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <form name=searchform action=search.php method=post> <tr> <td width="6"><img src="images/tb_bt_left.jpg" width="6" height="62" /></td> <td background="images/tb_bt_bg.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="266" align="center" valign="top" class="vd" style="font-size:11px;color:#333333"></td> <td height="58" align="center"><select name=key> <option value=model_no <? if($key == "model_no") echo "selected"; ?>>型号 Model No.</option> <option value=name <? if($key == "name") echo "selected"; ?>>名称 Name</option> <option value=features <? if($key == "features") echo "selected"; ?>>规格 Features</option> <option value=description <? if($key == "description") echo "selected"; ?>>说明 Descriptions</option> <option value=fob_port <? if($key == "fob_port") echo "selected"; ?>>港口 Fob Port</option> <option value=color <? if($key == "color") echo "selected"; ?>>颜色 Color</option> <option value=matial <? if($key == "matial") echo "selected"; ?>>材料 Matial</option> </select> 关键词 Keyword:<input type=text size=5 name=value value="<?php echo $value?>"> 产品号 ProductID:<input type=text size=5 name=productid value="<?php echo $productid?>"> <input type=hidden name=typeid value="<?php echo $typeid?>"> <input type=submit name=sub6 value="查找 Search"></td> </tr> </table></td> <td width="7"><img src="images/tb_bt_right.jpg" width="7" height="62" /></td> </tr> </form> </table></td> </tr> </table> <table width=95% border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td valign="top" width=350><table width="100%" height="160" border="0" cellpadding="1" cellspacing="1" bgcolor="#F3F1E7"> <tr> <td valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding=5> <tr> <td height="22" align="left" bgcolor="#E7E4D2"></td> </tr> <tr> <td height="350" align="left" class="vd"><FONT style=font-size:14px;color:#000000;line-height:22px><?php include "include/html/notice1.html";?><FONT></td> </tr> <tr> <td height="1" bgcolor="#f5f5f5"></td></tr> <tr> <td height="20" align="right"><a href=/help/about.php class="blue" target=_blank>联系我们 Contact Us</a>   |   <a href=/help/about.php class="blue" target=_blank>更多 More</a>   </td> </tr> </table></td> </tr> </table></td> <td width="5"> </td> <td> <table cellspacing=0 cellpadding=0 align="center" bgcolor=#ffffff> <tr><td align=center> <?php /* <font style=font-size:5px><br></font><table border=0 cellspacing=0 cellpadding=0> <tr> <td align=center width=311><img src=images/100001.jpg class=img1><font style=font-size:5px><br><br></font></td> <td bgcolor=#c1c69d width=1></td> <td align=center width=311><table cellspacing=0 cellpadding=0 align="center"> <tr align=center> <td colspan=2 height=5></td> </tr> <tr align=center> <td><a href=search.php?typeid=1001000><img src=images/200001.jpg alt="Molding Case" class=img1></a></td> <td><a href=search.php?typeid=1002000><img src=images/200002.jpg alt="Assembled Case" class=img1></a></td> </tr> <tr align=center> <td><a href=search.php?typeid=1003000><img src=images/200003.jpg alt="Instrument Box" class=img1></a></td> <td><a href=search.php?typeid=1004000><img src=images/200004.jpg alt="Aluminum Box" class=img1></a></td> </tr> </table><font style=font-size:2px><br><br></font></td> </tr> <tr> <td bgcolor=#c1c69d colspan=3></td> </tr> <tr> <td align=center><font style=font-size:5px><br></font><table cellspacing=0 cellpadding=0 align="center"> <tr align=center> <td><a href=search.php?typeid=2001000><img src=images/300001.jpg alt="Premium Bag" class=img1></a></td> <td><a href=search.php?typeid=2002000><img src=images/300002.jpg alt="Casual Bags" class=img1></a></td> </tr> </table></td> <td bgcolor=#c1c69d width=1></td> <td align=center><font style=font-size:5px><br></font><table cellspacing=0 cellpadding=0 align="center"> <tr align=center> <td><a href=search.php?typeid=3001000><img src=images/400001.jpg alt="Solid Wood Item" class=img1></a></td> <td><a href=search.php?typeid=3002000><img src=images/400002.jpg alt="Gift Item" class=img1></a></td> </tr> </table></td> </tr> </table><font style=font-size:5px><br></font>*/?> <a href=search.php><img src=images/01.jpg alt="Enter Please" class=img1 width=600></a> </td></tr> </table> </td> </tr> </table> <table border=0 cellpadding=0 cellspacing=0><form method=POST action=n2e.php target=frame1> <tr><td valign=middle>数字 Num<input type=text SIZE=16 name=id><INPUT TYPE=submit VALUE="英语 EN" NAME=s></td> <td><IFRAME name=frame1 frameBorder=1 width=780 scrolling=no height=26></IFRAME></td></tr></form> </table> <table border=0 cellpadding=0 cellspacing=0><form method=POST action=n2c.php target=frame2> <tr><td valign=middle>数字 Num<input type=text SIZE=16 name=id><INPUT TYPE=submit VALUE="中文 CN" NAME=s></td> <td><IFRAME name=frame2 frameBorder=1 width=780 scrolling=no height=26></IFRAME></td></tr></form> </table> <?php require_once("include/foot.php"); ?> </center> </body> </html>
最新发布
06-11
<%@ Page Language=“C#” AutoEventWireup=“true” CodeFile=“AddNewUser.aspx.cs” Inherits=“Admin_lizhitong_AddNewUser” %> <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> <html xmlns=“http://www.w3.org/1999/xhtml”> <head runat=“server”> <title>注册新用户</title> <link href=“/css/Style.css” rel=“stylesheet” type=“text/css” /> </head> <body> <form id=“form1” runat=“server”> <div> <table border=“0” width=“100%” cellspacing=“1” cellpadding=“2” id=“table2” class=“tableBorder”> <tr> <th valign=middle” colspan=“2” height=“25”> <table align=center” width=“100%”> <tr> <td width=“96%” colspan=“2”> 注册用户 </td> </tr> </table> </th> </tr> <tr> <td width=“150” height=“47” align=center” class=“forumRow”> 用户名: </td> <td class=“forumRow” align=“left”> <asp:TextBox ID=“tbYHM” runat=“server” Height=“19px” Width=“200px” spellcheck=“false” autocomplete=“off” aria-autocomplete=“none”></asp:TextBox> </td> </tr> <tr> <td width=“150” height=“47” align=center” class=“forumRow”> 用户密码: </td> <td class=“forumRow” align=“left”> <asp:TextBox ID=“tbYHMM” runat=“server” Height=“19px” Width=“200px” spellcheck=“false” autocomplete=“off” aria-autocomplete=“none”></asp:TextBox> </td> </tr> <tr> <td width=“150” height=“47” align=center” class=“forumRow”> 确认密码: </td> <td class=“forumRow” align=“left”> <asp:TextBox ID=“tbQRMM” runat=“server” Height=“19px” Width=“200px” spellcheck=“false” autocomplete=“off” aria-autocomplete=“none”></asp:TextBox> <asp:Literal ID=“mmErrorMessage” runat=“server”></asp:Literal> </td> </tr> <tr> <td width=“150” height=“47” align=center” class=“forumRow”> 用户姓名: </td> <td class=“forumRow” align=“left”> <asp:TextBox ID=“tbYHXM” runat=“server” Height=“19px” Width=“200px” spellcheck=“false” autocomplete=“off” aria-autocomplete=“none”></asp:TextBox> </td> </tr> <tr> <td width=“80” height=“47” align=center” class=“forumRow”> 所属区域: </td> <td class=“forumRow” align=“left”> <div class=“dropdown-container” style=“max-width: 450px;”> <asp:DropDownList ID=“ddlZJ” CssClass=“custom-dropdown” runat=“server” AutoPostBack=“True” onselectedindexchanged=“ddlZJ_SelectedIndexChanged”></asp:DropDownList> <asp:DropDownList ID=“ddlPCS” CssClass=“custom-dropdown” runat=“server” AutoPostBack=“True” onselectedindexchanged=“ddlPCS_SelectedIndexChanged”></asp:DropDownList> <asp:DropDownList ID=“ddlVillage” CssClass=“custom-dropdown” runat=“server” AutoPostBack=“True”></asp:DropDownList> </div> </td> </tr> <tr> <td width=“150” height=“47” align=center” class=“forumRow”> 工作单位: </td> <td class=“forumRow” align=“left”> <asp:TextBox ID=“tbGZDW” runat=“server” Height=“19px” Width=“200px” spellcheck=“false” autocomplete=“off” aria-autocomplete=“none”></asp:TextBox> <td class=“forumRow” align=“left”> <asp:DropDownList ID=“ddlYHJS” CssClass=“custom-dropdown” style=“width:300px;” runat=“server”></asp:DropDownList> </td> </tr> <tr> <td valign="middle" colspan="2" align="center" class="forumRow"> <span style="color: Red; padding-left: 10px;"> <asp:Button ID="btSubmit" runat="server" Text="提交注册" OnClick="btSubmit_Click" />  <asp:Literal ID="ltMessage" runat="server"></asp:Literal></span> </td> </tr> </table> </div> </form> </body> </html> 怎么让tbQRMM和tbYHMM显示为*号,不用TextMode="Password"方法
03-22
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值