Home >Web Front-end >HTML Tutorial >A weird problem with CSS borders! Find the solution! _html/css_WEB-ITnose

A weird problem with CSS borders! Find the solution! _html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:09:14853browse

My table has border-right: 1px invalid. I don’t know why.

 #tb2 td{	border-top: 1px solid;	border-bottom: 1px solid;	border-left: 1px solid;	border-right: 1px solid;	border-collapse: collapse;	padding-left: 2px;	padding-right: 2px;}


A table with ID tb2. I want every cell to be a solid line, but the effect is Indeed, everything else is ok except that the rightmost line does not have
. I checked the CSS using Firebug and found that #tb2 td has everything else working except border-right: 1px solid; which does not work.
Please solve it!
/


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</td>				<td>1-1</td>				<td>1-1</td>			</tr>			<tr>				<td>1-1</td>				<td>1-1</td>				<td>1-1</td>			</tr>					</table>	</body></html>


No problem, let’s see if there are other styles It's affected.

It looks like it is covered.

border: 1px solid #000000;
Set the color

border: 1px solid #000000;
Set the color
1

Me too If you have encountered this kind of situation, you should be covered

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