Home  >  Article  >  Web Front-end  >  About the border cannot be displayed when the td content of the table is empty_html/css_WEB-ITnose

About the border cannot be displayed when the td content of the table is empty_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:11:291598browse

My code is as follows:

<table class="right_table" border="1" cellpadding="1" cellspacing="0">CSS代码:[code=CSS].right_table {	width:700px;	border-bottom:5px solid #999;	border-left:3px solid #ccc;	border-top:3px solid #ccc;	border-right:5px solid #999;}
[/code]


Reply to discussion (solution)

<!DOCTYPE HTML><html>	<head>		<meta charset="gb2312" />		<title></title>		<style>			table {				border-collapse:collapse;			}			td {				border:1px solid red;			}		</style>	</head>	<body>		<table>			<tr>				<td>1-1--1</td>				<td>1-1--1</td>			</tr>			<tr>				<td>1-1--1</td>				<td></td>			</tr>					</table>	</body></html>



The key
border-collapse:collapse;

td must have a standing position  That’s fine too You don’t lose anything if the border doesn’t come out
You take it Isn’t there a space in the table td generated by the tool?
It doesn’t matter how you modify the style. There must be something in the td. This is the rule! ! Iron! !

border-collapse:collapse;
is the key.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:View details mean_html/css_WEB-ITnose" href="http://m.php.cn/faq/279395.html">What does View details mean_html/css_WEB-ITnoseNext article:View details mean_html/css_WEB-ITnose" href="http://m.php.cn/faq/279398.html">What does View details mean_html/css_WEB-ITnose