본문 바로가기

xhtml

div 태그로 짠 테이블


---------------------------------css---------------------------------

@charset "utf-8";
/* CSS Document */

* html, body {height: 100%}

body {
 margin: 10px auto;
 text-align:center;
}
#container {
 width:790px;
 border:1px solid red;
}
#header{
 height:100px;
 text-align:center;
 border-bottom:1px solid red;
}
#middle #left, #middle #center, #middle #right {float:left;}
#middle #left .left.content.c, #middle #left .left.content.d, #middle #left .left.content.e, #middle #left .left.content.f{
 width: 170px;
 margin:10px;
 border:1px solid red;
}
#middle #left .left.content.c{width:100px; height: 60px;}
#middle #left .left.content.d{width:100px; height: 70px;}
#middle #left .left.content.e{width:100px; height: 80px;}
#middle #left .left.content.f{width:100px; height: 40px;}

* html #middle #center, * html #middle #right {
 overflow:hidden;
 width: 310px;
}
*html #middle #right{
 margin-left:10px; 
}
#middle .center.content.g, #middle .center.content.h, #middle .right.content.j,
#middle .right.content.k, #middle .right.content.l{
 width:308px;
 margin-top: 10px;
 margin:10px;
 border:1px solid red;
}
#middle .center.content.g{height:130px;}
#middle .center.content.h{height:90px;}
#middle .right.content.j{height:70px;}
#middle .right.content.k{height:80px;}
#middle .right.content.l{height:58px;}
#middle #bottom {
 margin-left:16px;
 float:left;
 position: relative;
 right:6px;
 height:42px;
 width:640px;
 border:1px solid red;
}
#footer{
 clear:both;
 height:80px;
 text-align:center;
 border-top:1px solid red;
}

---------------------------------html---------------------------------

<!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" />
<title>무제 문서</title>
<link href="test3.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="container">
 <div id="header">a </div>
    <div id="middle">
    <div id="left">
 <div class="left content c">c</div>
 <div class="left content d">d</div>
    <div class="left content e">e</div>
        <div class="left content f">f</div>
    </div>
    <div id="center">
         <div class="center content g"> g </div>
         <div class="center content h"> h </div>
      </div>
     <div id="right">
         <div class="right content j"> j </div>
         <div class="right content k"> k </div>
         <div class="right content l"> l </div>
      </div>
      <div id="bottom"> i </div>
   </div>
   <div id="footer"> m </div>
</div>

</body>
</html>

'xhtml' 카테고리의 다른 글

img 태그에 width와 height 속성이 필요한 이유  (0) 2012.01.16
웹 표준 코딩  (0) 2011.07.14
xhtml 꾸미기  (0) 2011.07.13