【发布时间】:2015-10-12 18:32:39
【问题描述】:
我正在制作一个网页,以帮助我修改今年的计算机科学课程,并且在我制作的网页上,当您向下滚动时,会有 2 张图片,其中包含标题和描述这些其他内容的内容页面将包括。
但是,尽管我已将其居中对齐,但图像并没有出现在所有文本的中心。
我要问的是如何让 HTML 表格中的每个数据单元格成为其上方数据单元格的中心。我会发布一张图片,但我需要 10 声望。这是我的代码:
<div class="Main">
<br />
<br />
<table>
<tr>
<td>
<a href="">
<input type="image" id="Topics" position:absolute style="height:px; width:px;" src="./CSImages/Topics.PNG">
</a>
</td>
<td>
<a href="">
<input type="image" id="Languages" position:absolute style="height:px; width:px;" src="./CSImages/Languages.PNG">
</a>
</td>
</tr>
<tr>
<td>
<H2 align=c enter>Topics</h2>
</td>
<td>
<H2 align=c enter>Languages</H2>
</td>
</tr>
<tr>
<td>Here you will find Edexcel specification topics, it ranges from binary to compression to encryption</td>
<td>Here you will find a few of the main computer languages used in computing today, such as; Python, C#, HTML and plenty more...</td>
</tr>
</table>
</div>
感谢您的帮助!
【问题讨论】:
-
你还没有对齐 anything
center. -
确保将来使用 CSS(narawas 的答案),因为 html
align已被贬值。 codehelp.co.uk/html/deprecated.html
标签: html css image alignment html-table