HTML表格单元格定位元素,使它们堆叠在单元格的特定区域[关闭](HTML table cell positioning elements so that they are stacked in a specific area of the cell [closed])
如何将元素放置在html表格单元格中,以便一个元素位于左侧并居中,而另外两个元素位于第一个元素的侧面并且彼此堆叠。
例如:
狗男性女性
狗将在左侧居中,而雄性和雌性将在彼此的顶部并且在第三个细胞中垂直居中。
How would you position elements in an html table th cell so that one element is on the left side and is centered while another two elements are positioned to the side of the first element and are stacked on top of one another.
For example:
dog male female
dog would be centered on the left hand side while male and female would be on top of one another and centered vertically in the th cell.
最满意答案
我不知道这是否是你需要的。 但是我试着table within a table做一张table within a table
<table border="1px solid black"> <tr> <td> <table> <tr> <td rowspan="2">Dog</td> <td>male</td> </tr> <tr> <td>female</td> </tr> </table> </td> </tr> </table>这是一个小提琴样本 。
I dont know if this is what you need. but I tried to do a table within a table thingy
<table border="1px solid black"> <tr> <td> <table> <tr> <td rowspan="2">Dog</td> <td>male</td> </tr> <tr> <td>female</td> </tr> </table> </td> </tr> </table>Here's a fiddle sample.
更多推荐
发布评论