Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
XML、XSL和CSS中的表更改_Css_Xml_Xslt - Fatal编程技术网

XML、XSL和CSS中的表更改

XML、XSL和CSS中的表更改,css,xml,xslt,Css,Xml,Xslt,我有一个文件已经填充了要修改的数据。查询与表相关 这是我在file.XML中的代码: <component> <section> <text> <table> <thead> <tr> <th

我有一个文件已经填充了要修改的数据。查询与表相关

这是我在file.XML中的代码:

    <component>
        <section>   
            <text>
                <table>
                    <thead>
                        <tr>
                            <th>
                                Vermögen
                            </th>
                            <th>
                                Pflegediagnosen und Pflegeinterventionen
                            </th>
                        </tr>
                    </thead>        
                    <tbody>
                        <tr>
                            <td>
                            o selbstständig <br />
                            </td>
                            <td>rowspan down</td>
                        </tr>
                        <tr>
                            <td>o teilweise Unterstützung</td>
                        </tr>
                        <tr>
                            <td>o vollständige Unterstützung</td>
                        </tr>
                        <tr>
                            <td>o Kontrolle und Aufsicht</td>
                        </tr>
                    </tbody>
                </table>        
            </text>
正如您在CSS文件中看到的,表格的宽度为100%, 现在我有两列,想将第一列的宽度设置为40%,第二列的宽度设置为60%

在我的XML中

<td>rowspan down</td>
rowspan向下
我想划一排下来。我不知道该把它放在哪里。与行跨度相关的所需输出:

我可能有更多的表,不想将此设置提供给除此之外的任何其他表

有人能帮我吗。 提前非常感谢

您好,
Mario

这似乎不清楚rowspan应该如何工作,在您的源代码中,rowspan实际上是由
rowspan down
中的文本设置的,您如何知道它下降了多少?至于CSS,只需将td:first child设置为60%。。。rowspan向下移动了4行,就在表的底部:)好的,谢谢,我会尝试td:first child,但是每个表的第一个孩子都是60%或者?好的,你必须将它限制在一个特定的类中,然后
。myTableClass td:first child
行span对我来说仍然没有意义,你应该提供一个你希望你的输出是什么样子的例子。这里我的例子:|关于宽度:我试过了。部分_表td:first child{width:60%;}但它不起作用:/
.section_table {
  border: 0.2em solid black;
  width: 100%;
}

.section_table td ul {
  margin-top: 0;
  margin-bottom: 0;
}

.section_table th {
  text-align: left;
  background-color: #F8D683;
  border-bottom: 0.2em solid white;
}

.section_table tr:nth-child(2n),
.section_table .even td {
  background-color: #FCF0D3;
}

.section_table th,.section_table td {
  padding: 0.3em;
}
<td>rowspan down</td>