表格格式 [英] table formatting

查看:83
本文介绍了表格格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我有一个很好的简单表格和/或CSS格式问题,对于任何一个大师来说

那里。


我有一个包含4列的表 - 没有宽度任何东西的属性。


有些行有4个单元格(称为这些类型A),有些行有colspan = 4(类型

B)


某些类型B行的文本比所有类型A单元格放在一起的文本多得多。

当发生这种情况时,表格的总宽度会扩大(这很好),但是

它会均匀地扩展所有4列,这使得A行看起来像是错误的b / b
。我想要第4列(或者可能是额外的第5列)

占用所有松弛,以便类型A行的宽度与

相同如果B型行只有一个短值。


有什么想法吗? - 我已经尝试放入宽度= 100%的第5列但是这个

导致前4列在每个

空间时分成多行。

解决方案

Andy Fish写道:

大家好,

我有这里有一个很好的简单表和/或CSS格式化问题。

我有一个有4列的表 - 没有宽度任何东西的属性。

有些行有4个单元格(称为这些类型A),有些行有colspan = 4(类型
B)

某些类型B行比所有类型A单元组合的文本多得多。
当发生这种情况时,表的总宽度会扩大(这很好)但是它会均匀地扩展所有4列,这样就可以了一行看起来错了。我想要第4列(或可能是额外的第5列)
占用所有松弛,以便类型A行的宽度与
相同,如果类型B行只有一个短它的价值。

任何想法? - 我已经尝试放入宽度= 100%的第5列但是这个
会导致前4列在有空间的情况下分成多行。




试试css-tables


< style type =" text / css">

。 .wrapper {

float:left;

border:1px solid black;

}


..cell {

float:left;

clear:right;

border:1px solid red;

}


..cell_right_fill {

display:block;

border:1px solid green;

}


..break {

clear:both;

}

< /风格>

< div class = wrapper>

< div class = cell> blabla< / div>

< div class = cell> blabla< / div>

< div class = cell> blabla< / div>

< div class = cell> blabla bla< / div>

< div class = break>< / div>


< div class = cell_right_fill> blablablabla

blablablablablablablablablablablablablablablabla< / div>

< / div>




" Ali Babba" <铝****** @ 40Bandits.com>在消息中写道

news:cu ********** @ news.hispeed.ch ...



尝试css-tables




感谢您的回复。不幸的是,这并没有给我表格

格式化我需要的。


的A行,我需要它们排在页面下方。否则我只能

每行都有一张单独的桌子


Andy


< blockquote> Andy Fish写道:

我有一个有4列的表 - 没有宽度属于
任何东西。

有些行有4个单元格(称为这些类型A),有些行有
colspan = 4(类型B)

某些类型B行的文本比所有类型的A />单元放在一起的文本多得多。当发生这种情况时,表的总宽度会扩展(这很好),但它会均匀地扩展所有4列,这使得A类行看起来不对。我希望第4列(或可能是额外的第5列)占用所有松弛,以便A类行的宽度与B类行的宽度相同只有很短的价值。

任何想法? - 我已经尝试放入第5列,宽度= 100%,但这会导致前4列在有空格时分成多行。




为什么不放入没有宽度的第5列,并将

所需的宽度设置为前4?


- -

Els http://locusmeus.com/

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

- Renato Russo -

现在播放:Madness - On The Beat Pete


Hi All,

I have a nice easy table and/or CSS formatting problem for any gurus out
there.

I have a table with 4 columns - no "width" attribute on anything.

Some rows have 4 cells in (call these type A) and some have colspan=4 (type
B)

Some type B rows have much more text than all the type A cells put together.
When this happens, the total width of the table expands (which is good) but
it expands all the 4 columns evenly and this makes the type A rows look
wrong. I would like to have the 4th column (or possibly an extra 5th column)
take up all the slack so that the type A rows have their width the same as
if the type B row only had a short value in it.

Any ideas? - I''ve tried putting in a 5th column with width=100% but this
causes the first 4 columns to break into multiple lines whenever there is a
space.

解决方案

Andy Fish wrote:

Hi All,

I have a nice easy table and/or CSS formatting problem for any gurus out
there.

I have a table with 4 columns - no "width" attribute on anything.

Some rows have 4 cells in (call these type A) and some have colspan=4 (type
B)

Some type B rows have much more text than all the type A cells put together.
When this happens, the total width of the table expands (which is good) but
it expands all the 4 columns evenly and this makes the type A rows look
wrong. I would like to have the 4th column (or possibly an extra 5th column)
take up all the slack so that the type A rows have their width the same as
if the type B row only had a short value in it.

Any ideas? - I''ve tried putting in a 5th column with width=100% but this
causes the first 4 columns to break into multiple lines whenever there is a
space.



try css-tables

<style type="text/css">
..wrapper {
float: left;
border: 1px solid black;
}

..cell {
float: left;
clear: right;
border: 1px solid red;
}

..cell_right_fill {
display: block;
border: 1px solid green;
}

..break {
clear: both;
}
</style>
<div class=wrapper>
<div class=cell>blabla</div>
<div class=cell>blabla</div>
<div class=cell>blabla</div>
<div class=cell>blabla bla</div>
<div class=break></div>

<div class=cell_right_fill>blablablabla
blablablablablablablablablablablablablabla</div>
</div>



"Ali Babba" <Al******@40Bandits.com> wrote in message
news:cu**********@news.hispeed.ch...



try css-tables



Thanks for the reply. Unfortunately this doesn''t give me the table
formatting that I need.

for the A rows, I need them to line up down the page. otherwise I could just
have had a separate table for each row

Andy


Andy Fish wrote:

I have a table with 4 columns - no "width" attribute on
anything.

Some rows have 4 cells in (call these type A) and some have
colspan=4 (type B)

Some type B rows have much more text than all the type A
cells put together. When this happens, the total width of
the table expands (which is good) but it expands all the 4
columns evenly and this makes the type A rows look wrong. I
would like to have the 4th column (or possibly an extra 5th
column) take up all the slack so that the type A rows have
their width the same as if the type B row only had a short
value in it.

Any ideas? - I''ve tried putting in a 5th column with
width=100% but this causes the first 4 columns to break
into multiple lines whenever there is a space.



Why not putting in a 5th column without a width, and setting the
desired width to the first 4?

--
Els http://locusmeus.com/
Sonhos vem. Sonhos v?o. O resto é imperfeito.
- Renato Russo -
Now playing: Madness - On The Beat Pete


这篇关于表格格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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