본문 바로가기

Web/CSS

TABLE 선 얇게 하는 속성

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css"> 
table{
 margin: 0 auto;
 border-collapse: collapse;
 border:1px solid #B7C8F6;
}
</style>
<body>
<table cellspacing="0" cellpadding="0">
<tr>
     <td></td>
</tr>
</table>
</body>
</html>
위와 같이 테이블 속성에  "BORDER-COLLAPSE: collapse;" 이런식으로 주면



이렇게 이렇게 이렇게
이렇게 이렇게 이렇게
이렇게 이렇게 이렇게
이렇게 이렇게 이렇게

얇게 나온다. 위의 결과를 봐서는 잘 모르겠지만 얇다 -_-

여기서 중요한것은 tr 이나 td 에 주는것이 아니라 table 에 속성을 주어야 한다는 것이다.