在我的表格图像(左列)中不起作用。它具有用于 tbody
、td
和 tr
的默认 CSS 规则(来自模板)。
我在 table
外使用了 div
并为所有元素赋予了新的 id
和/或 class
属性。
样式表指定了vertical-align:baseline
,但我不想要那样。
HTML
<div class= "search-result-table">
<table class="job-search-result">
<tr class="job-search-result-row">
<td class="job-search-img" rowspan="4">
<img class="job-search-image" src="../images/test-img.jpg" alt="company logo"> </td>
<td class="job-search-job-title"> Job Title</td>
<td class="job-view" rowspan="4">
<button type="button" value="view"> View </button>
</td>
</tr>
<tr>
<td class="job-search-compay-name"> Company Name </td>
</tr>
<tr>
<td class="job-search-location-date"> Job Location and Date posted</td>
</tr>
<tr>
<td class="job-search-job-detail"> <a href="">More about ths job</a></td>
</tr>
</table>
</div>
CSS
.job-search-result { border: solid 1px black; font-family: inherit; }
.job-search-result { vertical-align: middle; }
.job-search-img { width: 25%; }
.job-search-img img { width: 150px; height: 150px; }
.job-search-job-title { width: 65%; margin-top: 0em; padding-top: 0em; }
.job-view { width: 10%; }
最佳答案
关于html - 表 rowspan 错误 html 和 css,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31927804/