标签: html-table

android表格布局rowspan

我想构建以下布局,但它无法正常工作.

alt text http://toms-toy.de/rowspan.gif

<LinearLayout android:orientation="horizontal"...>
  <ImageView ...></ImageView>
        <TableLayout ...>
                        <TableRow..>
                              <ImageView ...></ImageView>
                              <ImageView ...></ImageView>
                              <ImageView ...></ImageView>
                        </TableRow>
                         <TableRow..>
                              <ImageView ...></ImageView>
                              <ImageView ...></ImageView>
                              <ImageView ...></ImageView>
                        </TableRow>
       </TableLayout>
  <ImageView ...></ImageView>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)

android html-table tablelayout

18
推荐指数
2
解决办法
5万
查看次数

在表格布局中确定单元格宽度时,Webkit浏览器不考虑填充:已修复

在应用于table-layout:fixed表格并在单元格上使用填充时,我得到了不同的结果.通过将单元格宽度和填充添加在一起,IE和Firefox似乎可以正常工作.Chrome和Safari仅使用单元格宽度.我看到问题有一个错误,但找不到任何解决方法.有谁知道如何绕过它?

WebKit Bugzilla:https://bugs.webkit.org/show_bug.cgi?id = 13339

table {
width:200px;
border-collapse:collapse;
}
#table-1 {
table-layout:auto;
}
#table-2 {
table-layout:fixed;
}
td {
padding:5px 10px;
}
td.set-width {
width:15px;
}
.box {
width:15px;
height:15px;
background-color:red;
}

<h2>Table-Layout: Auto</h2>
<table border="1" cellspacing="0" cellpadding="0" id="table-1">
<tr>
<td>&nbsp;</td>
<td class="set-width"><div class="box"></div></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>unbroken</td>
</tr>
</table>
<h2>Table-Layout: Fixed</h2>
<table border="1" cellspacing="0" cellpadding="0" id="table-2">
<tr>
<td>&nbsp;</td>
<td class="set-width"><div class="box"></div></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>unbroken</td>
</tr>
</table>
Run Code Online (Sandbox Code Playgroud)

html css webkit html-table

18
推荐指数
1
解决办法
4611
查看次数

<h:selectOneRadio>渲染表格元素,如何避免这种情况?

有没有办法告诉JSF它<table>在使用时不应该呈现元素<h:selectOneRadio>?我不使用表格,在这种情况下它完全没有意义.

任何帮助表示赞赏!

jsf html-table selectoneradio

18
推荐指数
1
解决办法
2万
查看次数

TypeError:使用jQuery Datatables Library时未定义oColumn

我有一个问题是让jQuery Datatables库在我的Joomla网站表上正确显示. http://datatables.net

脚本是我的表的一半样式,然后放弃(我得到表头颜色更改和文本颜色,但没有数据表控件等).

Firebug也抛出以下错误:

 TypeError: oColumn is undefined
Run Code Online (Sandbox Code Playgroud)

在我的Joomla模板index.php中我有以下内容<head>:

<script src="./datatables/js/jquery.js" type="text/javascript"></script>
<script src="./datatables/js/jquery.dataTables.js" type="text/javascript"></script>
<script type="text/javascript"> 
    jQuery.noConflict();                
    jQuery(document).ready(function() {
    jQuery('#staff_table').dataTable({
        "bLengthChange": true,
        "bFilter": true,
        "bSort": true,
        "bInfo": true,
        "bAutoWidth": true
        } );
    } );
</script>
Run Code Online (Sandbox Code Playgroud)

HTML/PHP看起来像这样:

<h3>Members of Staff</h3>
<p>If you're looking for a member of staff at Tower Road Academy, you'll find their details here.</p>
<table class="staff_table" id="staff_table">
    <tr class="staff_table_head">
        <th>Name</th>
        <th>Job Title</th>
        <th>Email Address</th>
    </tr>

    <?php
        $result = mysql_query("SELECT * FROM itsnb_chronoforms_data_addstaffmember");

        while($row = …
Run Code Online (Sandbox Code Playgroud)

html php jquery html-table datatables

18
推荐指数
1
解决办法
2万
查看次数

与colspan ="2"连接的表数据的中心文本与.css"选择td与属性colspan ="2""

嗨我有一个表,其中一行中的某些列与colspan="2"属性连接.

目前它看起来像这样:

在此输入图像描述

我希望连续列中的连接列的文本居中,但只有连接列中的文本

此行的表数据(无限制)具有以下代码

<tr class="row-4 even">    
<td colspan="2" class="column-3 footable-last-column" style="display: table-cell;">unlimited</td>
</tr>
Run Code Online (Sandbox Code Playgroud)

我无法更改表的代码,因为它是由Wordpress插件自动创建的 tablepress

我能做的是添加一个自定义的.css文件.

我的问题是,如果可以只选择colspan="2"具有.css 属性的表数据 ,那么我{ text-align: center }只能对具有该属性的表数据进行操作colspan="2"

html css wordpress html-table

18
推荐指数
2
解决办法
4万
查看次数

Bootstrap响应表 - >使用列更改行

我在使用Bootstrap为学校创建时间表时遇到问题.时间表应对移动设备和平板电脑做出响应.

大屏幕的视图效果很好,但是当它切换到移动视图时,它会用列更改行.

Tabletview:http://imgur.com/U3ger2a,6ThcH1l 在此输入图像描述

Mobileview:http://imgur.com/U3ger2a,6ThcH1l#1 在此输入图像描述

主要的html文件:

@media only screen and (max-width: 800px) {
/* Force table to not be like tables anymore */
#no-more-tables table,
#no-more-tables thead,
#no-more-tables tbody,
#no-more-tables th,
#no-more-tables td,
#no-more-tables tr {
display: block;
}
 
/* Hide table headers (but not display: none;, for accessibility) */
#no-more-tables thead tr {
position: absolute;
top: -9999px;
left: -9999px;
}
 
#no-more-tables tr { border: 1px solid #ccc; }
  
#no-more-tables td {
/* Behave like a …
Run Code Online (Sandbox Code Playgroud)

html5 html-table css3 twitter-bootstrap

18
推荐指数
1
解决办法
6万
查看次数

具有固定页眉和页脚的HTML表以及没有固定宽度的可滚动主体

我想创建一个固定theadtfoot可滚动的表tbody!

我尝试了几种方法,包括CSS和CSS + Javascript,但它们都很弱且不可靠,我可以通过更改演示中的标记轻松打破它们.

我想要的是一种让表格像表格一样的方法,这意味着浏览器会根据内容(在窗口调整大小的情况下在页面加载时)自动调整列,在这些情况下:

  1. 如果列的header(thead > tr > th)的内容大于列的body(tbody > tr > td)的内容并且大于列的footer(tfoot > tr > td)的内容,则列应根据列的标题大小调整大小

  2. 如果列的body(tbody > tr > td)的内容大于列的header(thead > tr > th)的内容并且大于列的footer(tfoot > tr > td)的内容,则列应根据列的主体大小调整大小

  3. 如果列的footer(tfoot > tr > td)的内容大于列的header(thead > tr > th)的内容并且大于列的body(tbody > tr > td)的内容,则列应根据列的页脚大小调整大小

table下面应澄清的情况:

<table>
  <thead>
    <tr> …
Run Code Online (Sandbox Code Playgroud)

html javascript css html-table

18
推荐指数
3
解决办法
4万
查看次数

html表格单元格组合

我有一个3行3列的表.如何组合最后一行?我的HTML:

<table>
  <tr><td></td><td></td><td></td></tr>
  <tr><td></td><td></td><td></td></tr>
  <tr><td>Here I need a cell by all width</td></tr>
</table>
Run Code Online (Sandbox Code Playgroud)

html css html-table

17
推荐指数
2
解决办法
6万
查看次数

如何打破表td中的长词?

这就是我所拥有的:

<td style='width:500px; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;'>

css words html-table long-integer

17
推荐指数
4
解决办法
2万
查看次数

如何使用HTMLTableElement.insertRow在表的末尾插入行

背景和设置

我正在尝试使用javascript中的表格数据创建一个表,但是当我尝试将行插入到表元素中时,它会以与我期望的相反的顺序插入,并且使用相反的顺序appendChild.(这是一个jsfiddle与现场演示).

说我有这样的数据:

var data = [
    {"a": 1, "b": 2, "c": 3},
    {"a": 4, "b": 5, "c": 6},
    {"a": 7, "b": 8, "c": 9}
], keys = ["a", "b", "c"];
Run Code Online (Sandbox Code Playgroud)

如果我尝试使用insertRow()insertCell()方法创建表,则迭代上面的数据和键.我得到了我期望的相反顺序:

InsertRows图片

使用以下代码生成:

// insert a table into the DOM
var insertTable = insertDiv.appendChild(document.createElement("table")),
    thead = insertTable.createTHead(), // thead element
    thRow = thead.insertRow(), // trow element
    tbody = insertTable.createTBody(); // tbody element


thRow.insertCell().innerText = "#"; // add row header

// insert columns …
Run Code Online (Sandbox Code Playgroud)

html javascript dom html-table

17
推荐指数
1
解决办法
7万
查看次数