프로그램/html,css2009. 11. 2. 21:46
반응형



[table2.htm]
<html>
<head>
<link rel="stylesheet" type="text/css" href="table2.css" />
</head>

<body>

<table class="boardList">
<tr>
 <th class="number">번호</th>
 <th class="title">제목</th>
 <th class="writer">작성자</th>
 <th class="date">작성일</th>
 <th class="viewCnt">조회</th>
</tr>
<tr>
 <td>1</td>
 <td>제목</td>
 <td>작성자</td>
 <td>작성일</td>
 <td>조회수</td>
</tr>
<tr>
 <td>2</td>
 <td>제목</td>
 <td>작성자</td>
 <td>작성일</td>
 <td>조회수</td>
</tr>
<tr>
 <td>3</td>
 <td>제목</td>
 <td>작성자</td>
 <td>작성일</td>
 <td>조회수</td>
</tr>
</table>
</body>
</html>


[table2.css]
.boardList
{
 clear: both;
 table-layout: fixed;
 font-size: 12px;
 width: 100%;
 border-collapse: collapse;
 color: #ff2d88;
 background-color: #fcfcfc;
 text-align: center;
 border-top: 2px solid #8f73d7;
 border-bottom: 1px solid #ececec;
}

.boardList th
{
 padding: 0;
 font-weight:bold;
 height:30px;
}

.boardList td
{
 padding: 5px 0px 0px 0px;
 font-weight:normal;
 color:#333;
 height:21px;
 border-top:1px solid #ececec;
}

.boardList th.number {width: 53px;background: url('../images/menu_barbg.gif') right no-repeat;}
.boardList th.title {width: *;background: url('../images/menu_barbg.gif') right no-repeat;}
.boardList th.writer {width: 70px;background: url('../images/menu_barbg.gif') right no-repeat;}
.boardList th.date {width: 55px;background: url('../images/menu_barbg.gif') right no-repeat;}
.boardList th.viewCnt {width: 55px;}

반응형
Posted by 은둔고수