【发布时间】:2012-04-17 10:33:28
【问题描述】:
我遇到了另一个问题,这次是 HTML 中的表格及其边框(4.01、5.0)
注意:所有代码均来自 w3schools.com
使用此代码时:
<h4>One row and three columns:</h4>
<table border="1">
<tr>
<td>100</td>
<td>200</td>
<td>300</td>
</tr>
</table>
浏览器(FF、IE、Opera、Chrome)中的所有内容都正确绘制,但是当border="1" 更改为style="border: 1px;" 时,边框和单元格墙会消失。
我找不到原因,但使用style 给了我宝贵的验证。
这是我的主要文件部分:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<title>
Title of the document
</title>
<style type="text/css">
body {background-color:teal;}
</style>
</head>
我希望这里有人知道问题出在哪里......
以下是经典border 和style 的结果:
http://www.free imagehosting.net/pyk3e << border="1"
http://www.free imagehosting.net/cw98o << style="border: 1px solid black;" for cells too
【问题讨论】:
-
图片链接现在已经失效,使得问题不清楚。
标签: html css html-table border