1px 라인 css와 2개이상 class 적용. > 개발자팁

개발자팁

개발과 관련된 유용한 정보를 공유하세요.
질문은 QA에서 해주시기 바랍니다.

1px 라인 css와 2개이상 class 적용. 정보

JavaScript 1px 라인 css와 2개이상 class 적용.

본문

//기존
<table width="500" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>내용</td>
  </tr>
  <tr>
    <td height="1" bgcolor="#CCCCCC"></td>
  </tr>
</table>


//css
<style type="text/css">
.line_bottom {border-bottom:1px solid #ccc; }
.line_top {border-top:1px solid #ccc; padding:4px 0 4px 0;}
.div_width {width:500px;}
</style>

-div 바텀 라인
<div class="line_bottom div_width">내용</div>

-div 탑 라인
<div class="line_top div_width">내용</div>

-table "내용" 아래 위로 한줄씩
<table width="500" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="line_bottom line_top">내용</td>
  </tr>
</table>

예제처럼 두가지 이상 클래스 적용시
class="class_01 class_02" 식으로 한다.

[이 게시물은 관리자님에 의해 2011-10-31 17:16:08 PHP & HTML에서 이동 됨]
추천
0

댓글 0개

전체 5,397
개발자팁 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT