如何显示表格并选择彼此相邻 [英] How to display table and select next to each other

查看:80
本文介绍了如何显示表格并选择彼此相邻的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何显示表格并选择彼此相邻?


< html>

< body>

< table border = 1 style =" display:inline-table">

< tr>< td> Hello1< / td>< / tr>

< tr>< td> Hello2< / td>< / tr>

< tr>< td> Hello3< / td>< / tr>

< tr>< td> Hello4< / td>< / tr>

< tr>< td> Hello5< / td>< / tr>

< / table>

< select size =" 3">

< option value =" 1"> 1< ; / option>

< option value =" 1"> 2< / option>

< option value =" 1"> 3< /选项>

< / select>

< / body>

< / html>


在Mozilla 3.0.1中,该表位于左侧,包含5行数据。

选择尺寸3就在它旁边,这要归功于内联表,这是好的。
罚款。但是,select的底部与

第一个表格单元格的底部对齐。我想要的是选择的顶部与

对齐表格顶部。


IE 7显示表格下方的选择,忽略内联-table

指令。


所以问题是如何让它与选择的顶部对齐

顶部Mozilla和IE中的表格。


谢谢。

How to display table and select next to each other?

<html>
<body>
<table border=1 style="display:inline-table">
<tr><td>Hello1</td></tr>
<tr><td>Hello2</td></tr>
<tr><td>Hello3</td></tr>
<tr><td>Hello4</td></tr>
<tr><td>Hello5</td></tr>
</table>
<select size="3">
<option value="1">1</option>
<option value="1">2</option>
<option value="1">3</option>
</select>
</body>
</html>

In Mozilla 3.0.1, the table is on the left with 5 rows of data. The
select of size 3 is next to it, thanks to the inline-table, which is
fine. However, the bottom of the select aligns with the bottom on the
first table cell. What I want is the top of the select to align with
the top of the table.

IE 7 displays the select below the table, ignoring the inline-table
directive.

So the question is how to get it to align the top of the select with
the top of the table in Mozilla and IE.

Thanks.

推荐答案

2008年9月7日星期日18 :01:04-0700(PDT)

" re ************* @ yahoo.com" < re ************* @ yahoo.com写道:

< ae ***************** ***************** @ r15g2000prh。 googlegroups.com>
On Sun, 7 Sep 2008 18:01:04 -0700 (PDT)
"re*************@yahoo.com" <re*************@yahoo.comwrote in:
<ae**********************************@r15g2000prh. googlegroups.com>

如何显示表格并选择彼此相邻?
How to display table and select next to each other?



[snip]

[snip]


所以问题是如何让它在选择的顶部与

对齐Mozilla和IE中的表顶部。
So the question is how to get it to align the top of the select with
the top of the table in Mozilla and IE.



考虑再支持几个浏览器。


可以根据需要显示以下URL。为了支持更多的Mozilla浏览器,它确实使用了一小部分无效的CSS。

http://tinyurl.com/5fmn8o

-


BootNic Sun 2008年9月7日晚上11点09分

幽默是一种在安宁中记忆犹新的情感混乱。 br $>
* James Thurber *


----- BEGIN PGP SIGNATURE -----

版本:GnuPG v2.0.9 (GNU / Linux)


iEYEARECAAYFAkjEl3YACgkQylMUzZO6jeLIJwCggrP + do9ah9 wp3v6AUVOTx + / J

ZJMAoK4YiZwVZthuUYaVVdKsdzrJHAEX

= / u7g

----- END PGP SIGNATURE -----

Consider supporting just a few more browsers.

The following URL may display as desired. It does use a wee bit of
invalid CSS in an attempt to support more Mozilla browsers.

http://tinyurl.com/5fmn8o

--

BootNic Sun Sep 7, 2008 11:09 pm
Humor is emotional chaos remembered in tranquility.
*James Thurber*

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAkjEl3YACgkQylMUzZO6jeLIJwCggrP+do9ah9 wp3v6AUVOTx+/J
ZJMAoK4YiZwVZthuUYaVVdKsdzrJHAEX
=/u7g
-----END PGP SIGNATURE-----


2008-09-08, re ************* @ yahoo.com < re ******** *****@yahoo.comwrote:
On 2008-09-08, re*************@yahoo.com <re*************@yahoo.comwrote:

如何显示表格并选择彼此相邻?

< html>
< body>
< table border = 1 style =" display:inline-table">

< tr>< td> ; Hello1< / td>< / tr>

< tr>< td> Hello2< / td>< / tr>

< tr>< ; td> Hello3< / td>< / tr>

< tr>< td> Hello4< / td>< / tr>

< tr> ;< td> Hello5< / td>< / tr>
< / table>
< select size =" 3">

< option value =" 1"> 1< / option>

< option value =" 1"> 2< / option>

< option value = " 1"> 3< / option>
< / select>
< / body>
< / html>


在Mozilla 3.0.1中,表格左侧有5行数据。

选择尺寸3就在它旁边,这要归功于内联表,这是好的。
罚款。但是,select的底部与

第一个表格单元格的底部对齐。我想要的是选择的顶部与表格的顶部对齐


How to display table and select next to each other?

<html>
<body>
<table border=1 style="display:inline-table">
<tr><td>Hello1</td></tr>
<tr><td>Hello2</td></tr>
<tr><td>Hello3</td></tr>
<tr><td>Hello4</td></tr>
<tr><td>Hello5</td></tr>
</table>
<select size="3">
<option value="1">1</option>
<option value="1">2</option>
<option value="1">3</option>
</select>
</body>
</html>

In Mozilla 3.0.1, the table is on the left with 5 rows of data. The
select of size 3 is next to it, thanks to the inline-table, which is
fine. However, the bottom of the select aligns with the bottom on the
first table cell. What I want is the top of the select to align with
the top of the table.


IE 7显示表格下方的选择,忽略内联表格

指令。


所以问题是如何让它在选择的顶部与

对齐Mozilla和IE中的表顶部。内联表中的
IE 7 displays the select below the table, ignoring the inline-table
directive.

So the question is how to get it to align the top of the select with
the top of the table in Mozilla and IE.



vertical-align:top应该可以解决问题,但不支持内联的
浏览器 - 表格。


您可以在IE中获得更多运气,只需将表格左侧浮动即可。


顺便提一下您的标记无效。请在 http://validator.w3.org 上查看

(或使用nsgmls)。

vertical-align: top on the inline table should do the trick, but not in
browsers that don''t support inline-table.

You may have more luck in IE by just floating the table left instead.

By the way your markup is not valid. Check it at http://validator.w3.org
(or with nsgmls).


9月8日,03:01,removeps-gro ... @ yahoo.com < removeps-

gro ... @ yahoo.comwrote:
On 8 Sep, 03:01, "removeps-gro...@yahoo.com" <removeps-
gro...@yahoo.comwrote:

如何显示表格并选择彼此相邻?

< html>
How to display table and select next to each other?
<html>



你没有DOCTYPE声明吗?

Don''t you have a DOCTYPE declaration?


< body>
<body>



该文件至少应该有一个标题。

The document should at least have a title.


< table border = 1 style =" ; display:inline-table">

*< tr>< td> Hello1< / td>< / tr>

*< tr>< ; td> Hello2< / td>< / tr>

*< tr>< td> Hello3< / td>< / tr>

*< ; tr>< td> Hello4< / td>< / tr>

*< tr>< td> Hello5< / td>< / tr>

< / table>

< select size =" 3">

*< option value =" 1"> 1< / option> ;

*< option value =" 1"> 2< / option>

*< option value =" 1"> 3< / option> ;

< / select>

< / body>

< / html>


在Mozilla 3.0.1中,表格左侧有5行数据。 *

选择大小3就在它旁边,这要归功于内联表,这是好的。
罚款。 *但是,选择的底部与

第一个表格单元格的底部对齐。 *我想要的是选择的顶部与

对齐表格的顶部。


IE 7显示表格下方的选择,忽略了内联表

指令。
<table border=1 style="display:inline-table">
* <tr><td>Hello1</td></tr>
* <tr><td>Hello2</td></tr>
* <tr><td>Hello3</td></tr>
* <tr><td>Hello4</td></tr>
* <tr><td>Hello5</td></tr>
</table>
<select size="3">
* <option value="1">1</option>
* <option value="1">2</option>
* <option value="1">3</option>
</select>
</body>
</html>

In Mozilla 3.0.1, the table is on the left with 5 rows of data. *The
select of size 3 is next to it, thanks to the inline-table, which is
fine. *However, the bottom of the select aligns with the bottom on the
first table cell. *What I want is the top of the select to align with
the top of the table.

IE 7 displays the select below the table, ignoring the inline-table
directive.



所以也是FF2。

So is FF2, too.


所以问题是如何让它对齐顶部选择与

在Mozilla和IE的表顶部。
So the question is how to get it to align the top of the select with
the top of the table in Mozilla and IE.



< table border = 1 style =" float:left; margin-right:1em">

<table border=1 style="float: left; margin-right: 1em">


这篇关于如何显示表格并选择彼此相邻的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆