当忽略宽度时使nowrap工作 [英] making nowrap work when width is ignored

查看:70
本文介绍了当忽略宽度时使nowrap工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在下面的例子中,在正常大小的屏幕上,一切看起来都是

的方式

你会认为它会(在IE6上) 。我的问题是当我将
添加

更多条目进入表格时会发生什么(这里等同于制作IE窗口

更小)


- 如果你把窗口缩小,那么第一列文字开始

换行,这是我不想要的

- 如果你删除宽度部分,无论如何都会被忽略,然后

文本

不再包装并出现滚动条,这就是我想要的。


问题是我确实要设置第一列的宽度,

但是

我希望表的其余部分一样小并尽可能安装


任何想法?


Ta

F


< style>

..BOB

{

white-space:nowrap;

宽度:500;

}

..Sue

{

white-space:nowrap;

}

< / style>

< table>

< tr>

< td class = Bob>所以随机文字< / td>

< td class = Sue>一些随机文字< / td>

< td class = Sue>一些随机文字< ; / td>

< td class = Sue>一些随机文本< / td>

< td class = Sue>一些随机文本< / td>

< / tr>

< / table>

Hi
In the example below on a normal size screen everything looks the
way
you would think it would (on IE6). My problem is what happens when I
add
more entries into the table (equivilent here to making the IE window
smaller)

- If you make the window smaller then the first column text starts to
wrap, which I don''t want
- If you remove the width part, which gets ignored anyway, then the
text
no longer wraps and a scrollbar appears, which is what I want.

The problem is that I do want to set the width of the first column,
but
I want the rest of the table to be as small and fitted as possible

Any ideas?

Ta
F

<style>
..Bob
{
white-space: nowrap;
width: 500;
}
..Sue
{
white-space: nowrap;
}
</style>
<table>
<tr>
<td class=Bob>Some random text </td>
<td class=Sue>Some random text </td>
<td class=Sue>Some random text </td>
<td class=Sue>Some random text </td>
<td class=Sue>Some random text </td>
</tr>
</table>

推荐答案

foldface写道:
foldface wrote:
width:500;
width: 500;




500是什么? 500个hobnobs?我的屏幕只有6.8个hobnobs宽。


-

Toby A Inkster BSc(荣誉)ARCS

联系我〜< a rel =nofollowhref =http://tobyinkster.co.uk/contacttarget =_ blank> http://tobyinkster.co.uk/contact



500 what? 500 hobnobs? My screen is only 6.8 hobnobs wide.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact


Toby Inkster写道:
Toby Inkster wrote:
foldface写道:
foldface wrote:
width:500;
width: 500;



500什么? 500个hobnobs?我的屏幕只有6.8 hobnobs。



500 what? 500 hobnobs? My screen is only 6.8 hobnobs wide.




平或侧面?


-

Els
http://locusmeus.com/

Sonhos vem。 Sonhos v?o。 Orestoébritfeito。

- Renato Russo -



Flat or sideways?

--
Els
http://locusmeus.com/
Sonhos vem. Sonhos v?o. O resto é imperfeito.
- Renato Russo -


Els写道:
Toby Inkster写道:
Toby Inkster wrote:
我的屏幕只有6.8个hobnobs宽。
My screen is only 6.8 hobnobs wide.



平面还是侧面?



Flat or sideways?




Flat明显。根据McVities CSS 2.2规范,使用hobnob单元指定的测量值b / b $ b bb应始终与显示器平放的普通

hobnobs相对应。 (巧克力涂层的hobnobs使你的屏幕变得很脏。)


-

Toby A Inkster BSc(荣誉)ARCS

与我联系〜 http://tobyinkster.co.uk/contact



Flat obviously. According to the McVities CSS 2.2 spec, measurements
specified using the hobnob unit should always be made against plain
hobnobs held flat against the monitor. (Chocolate coated hobnobs make
your screen all dirty.)

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact


这篇关于当忽略宽度时使nowrap工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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