问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501

要求:两个table表格在DIV内居中,并且不换行

发布网友 发布时间:2023-10-21 00:33

我来回答

5个回答

热心网友 时间:2024-03-30 03:51

<div style=" width:1000px; text-align:center; float:left; border:solid 1 green">

<table border="1" cellspacing="0" cellpadding="0" height="22" style="background: url(claro/images/buttonaction.png) repeat-x; background-position: 0 -23px; font-size: 12px; display:inline">
<tr>
<td width="5" height="22" style=" background: url(claro/images/buttonaction.png) no-repeat;"></td>
<td style="line-height: 22px; padding: 0 5px 0 5px; font-size: 12px; cursor: pointer;">按钮1</td>
<td width="5" height="22" style=" background: url(claro/images/buttonaction.png) no-repeat; background-position: -6px 0;"></td>
</tr>
</table>

<table border="1" cellspacing="0" cellpadding="0" height="22" style="background: url(claro/images/buttonaction.png) repeat-x; background-position: 0 -23px; font-size: 12px;display:inline">
<tr>
<td width="5" height="22" style=" background: url(claro/images/buttonaction.png) no-repeat;"></td>
<td style="line-height: 22px; padding: 0 5px 0 5px; font-size: 12px; cursor: pointer;">按钮2</td>
<td width="5" height="22" style=" background: url(claro/images/buttonaction.png) no-repeat; background-position: -6px 0;"></td>
</tr>
</table>

</div>

/*为了显示效果我添加了边框,你把边框改回去就行,主要就是给两个table加上display:inline样式*/

热心网友 时间:2024-03-30 03:51

<div style=" width:1000px; text-align:center; float:left;">
<table align="center"><tr><td>
<table border="0" cellspacing="0" cellpadding="0" height="22" style="background: url(claro/images/buttonaction.png) repeat-x; background-position: 0 -23px; font-size: 12px;">
<tr>
<td width="5" height="22" style=" background: url(claro/images/buttonaction.png) no-repeat;"></td>
<td style="line-height: 22px; padding: 0 5px 0 5px; font-size: 12px; cursor: pointer;">按钮1</td>
<td width="5" height="22" style=" background: url(claro/images/buttonaction.png) no-repeat; background-position: -6px 0;"></td>
</tr>
</table>

</td><td>
<table border="0" cellspacing="0" cellpadding="0" height="22" style="background: url(claro/images/buttonaction.png) repeat-x; background-position: 0 -23px; font-size: 12px;">
<tr>
<td width="5" height="22" style=" background: url(claro/images/buttonaction.png) no-repeat;"></td>
<td style="line-height: 22px; padding: 0 5px 0 5px; font-size: 12px; cursor: pointer;">按钮2</td>
<td width="5" height="22" style=" background: url(claro/images/buttonaction.png) no-repeat; background-position: -6px 0;"></td>
</tr>
</table></td>
</tr>
</table>
</div>

热心网友 时间:2024-03-30 03:52

<table align="center" 。。。。>
两个table都加上align="center" 就可以了
我觉得你可以看懂 其他代码不用改我就不给你写了

热心网友 时间:2024-03-30 03:52

在每一个table的style里面添加margin:auto;display:inline-table;

热心网友 时间:2024-03-30 03:53

<div style=" width:1000px; text-align:center; float:left;">
<table width="50%" style="float:left;"></table>
<table width="50%" style ="float:right"></table>
</div>
声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com
求抛物线y×y-6x=0的焦点坐标和准线方程 6-6x=6的解是x=0 .( ) 判断题 财富 一个方程问题:6x=0有没有解 6x=0,x=( ) 下列算式是方程的是( )A.101-1=100B.8x-2C.6x=0D.x-17 6X=0,这个方程没有解 对吗? 6x=0不是方程.××.(判断对错) 6x=0是方程. __ (判断对错) 今晚地球停电一小时,做点什么好呢 月经第八天还有褐色分泌物预防什么病 为什么110kv及以上的架空输电线路需要全线架设避雷线,而3...52 架空输电线路防雷措施有哪些3 mp4有几种视频格式? 输电线路防雷有哪些措施9 110kv及以上电力系统中,架空输电线路全线架设避雷线的目的...4 输电线路的防雷措施有哪些3 酮和胺的缩合需要什么条件? 车险几个案子与驾驶员 车险事故调包要承担什么法律责任 亳州车辆过户需要什么资料 为什么小儿癫痫发病率那么高? 问一个成语 我只知道典故 不知道这个成语是什么1 成语东城西就是什么意思7 四川玉屏山旅游资源开发有限公司玉屏山森林康养度假酒店怎么样? 中电建沧州建设发展有限公司怎么样? 我的住房贷款及两张信用卡在2008年有十次逾期还款,每次都是... 我十年前有张信用卡没有还完去MT机还钱时卡被注销了,怎么办? 你好我想问一下我办了一张信用卡十年了没有还里面的钱1 如何用一个手机号注册两个? 身体发肤,受之父母,不敢毁伤,孝之始也;立身行道,扬名于后世...21 亳州车辆违章罚款怎么收取 ...朋友和我分手了 可是我们有一个情侣软件小恩爱 他一直不让我删 不... 跟男朋友分手 然后你问他说 小恩爱删掉了吗 他说不会的 是什么意思... 男朋友因为我的脾气跟我分手了我该怎么办 本人单方车险事故调包驾驶员,但在车没修好结案之前被查出来。本人并... 气车事故,司机无证,说是别人开的平安车险给赔偿吗 当共同熟悉的食物出现,总是口舌生津心意相通,这句话是什么意思_百度知 ... 我是一名太平洋保险公司业务员在开早会的时候路上出了车祸保险公司有责... 宾利气减怎么升起来,就换了备胎气减下去没上来 贵阳那家宝马修理厂专业啊?有疑难杂症。怠速不稳。不要黑心修理厂,知道... 10月下旬海南的天气如何9 我10月20号的样子准备去海南玩五天,想问下那时气温如何,该... 海南10号到16号的天气情况怎样?3 海南最近是什么天气啊?28 海口市目前的天气情况12 10月中旬海南的天气如何?8 被盗了没有绑定手机号实名认证了会不会有影响 武陵山大裂谷到仙女山最新路况 怎样用一个手机号注册两个? 商业车险二次费改 优惠究竟有多大