Home > Article > Web Front-end > About the border cannot be displayed when the td content of the table is empty_html/css_WEB-ITnose
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]
<!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>
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.