设置表行高度 [英] set table row height
问题描述
我缺乏CSS的技能让我头痛。如下图所示,从firebug捕获:
使用一个名为Vaadin的GWT框架我已经给一个表组件类名 m2m-modal-table 我想设置一个最小高度到该表中的四行。但是,我似乎无法使它工作..从图像看,表甚至似乎没有类名称 m2m-modal-table ,但 v -table-table (
因此,任何人都可以使用已经安装的框架库好的知识CSS类引用告诉我应该在样式表中写什么来设置表的行高度?
谢谢!
编辑:谢谢你的帮助。我发现将CSS编写为:
.m2m-modal-table .v-table-table th,
.m2m-modal-table .v-table-table td {
height:55px;
min-height:55px;
}
只会设置有问题的表格上的样式,
b b b pre>
.v-table-table th,
.v-table-table td {
height:55px;
/ * min-height:55px; EDITED * /
}
会执行( min-height
单独不起作用。)
编辑:djsadinoff写道,高度不工作无处不在。 IE8和IE9解释 min-height
,但它不是其他浏览器的规范。
My lacking skills of CSS is giving me a headache. As presented in this picture below, captured from firebug:
Using a GWT like framework called Vaadin I have given a Table component the class name m2m-modal-table and I want set a min-height to the four rows in that table. However, I can't seem to get it to work.. And as you see from the image the table doesn't even seem to have the class name m2m-modal-table but v-table-table instead (styles are being added outside my involvement since I'm using an already setup framework library).
So, can anyone who has good knowledge of CSS class referring tell me what I should write in the style sheet to set the row height of the table?
Thank you!
EDIT: Thank you avall for the help. And I found that writing the CSS as:
.m2m-modal-table .v-table-table th,
.m2m-modal-table .v-table-table td {
height: 55px;
min-height: 55px;
}
Will only set the style on the table in question and not all tables in the application.
Always set your height to cells, not rows.
.v-table-table th,
.v-table-table td{
height: 55px;
/* min-height: 55px; EDITED */
}
will do (min-height
alone doesn't work).
Edit: As djsadinoff wrote, min-height doesn't work everywhere. IE8 and IE9 interpret min-height
but it is not the norm for other browsers.
这篇关于设置表行高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!