Trio ȨÆäÀÌÁö CSS ¸Å´º¾ó ¹Ú½º(box) Ư¼º ¿¹Á¦ ¸Þ´º·Î
CSS2 ±Ô°Ý ¹Ú½º ÂüÁ¶ HTML ±Ô°Ý Ç¥(table) ÂüÁ¶
space ¹Ú½º(box)¶õ À̹ÌÁö, µµÇü, ±ÛÀÚµéÀÇ ¸ðÀ½Ã¼¸¦ ¸»ÇÑ´Ù.
    p, table, ol, ul, img, input, textarea, select¿Í object µîÀÌ Æ÷ÇÔ µÈ´Ù.
space border´Â ÈÄ·¹ÀÓ Å׵θ®¸¦ ¸» ÇÔ.
space paddingÀº ÈÄ·¹ÀÓ°ú ³»¿ë¹°°úÀÇ °ø¹éÀ» ¸» ÇÔ.
    (HTML ±Ô°Ý border, padding, margin Â÷ÀÕÁ¡ ¼³¸í )
space marginÀº ¶³¾îÁø °ø¹éÀÇ Å©±â¸¦ ¸» ÇÔ.
space ¸ÕÀú °øÅë»çÇ×À» ±â¼úÇÏ°í ±×ÈÄ Æ¯Á¤ ÁöÁ¤Çϸé, µ¤¾î¾º¿ì±â¸¦ ÇÏ¿© ¸¶Áö¸· ÁöÁ¤ÀÌ Àû¿ë µÈ´Ù.
¾Æ·¡ CSS1 ¼³¸íÀº ½ºÆäÀ̽º °ü°è·Î '±Ô°Ý'À¸·Î ¿¬°á½ÃÄ×´Ù.
space
margin-top: margin-bottom: margin-left: margin-right:
±Ô°Ý ±Ô°Ý ±Ô°Ý ±Ô°Ý
ul {margin-top: 0.5in;} ul {margin-bottom: 0.5in;} p {margin-left: 3em;} img {margin-right: 30px;}
margin:
°øÅë
±Ô°Ý
h1 {margin: 2ex;}
div {margin: 3px 4px 5px 6px } À§, ¿ì, ÇÏ, Á ½Ã°è¹æÇâÀ¸·Î ÁöÁ¤
  • »óÇÏ, ÁÂ¿ì °£°ÝÀÇ Å©±â¸¦ ÁöÁ¤ ÇÑ´Ù. À½¼ö°¡ Çã¿ëµÇ³ª ÁÖÀÇ ÇÏ¿©¾ß ÇÑ´Ù.
  • ±æÀÌ, ¹éºÐÀ², auto
  • space
    padding-top: padding-bottom: padding-left: padding-right:
    ±Ô°Ý ±Ô°Ý ±Ô°Ý ±Ô°Ý
    ul {padding-top: 0.5in;} ul {padding-bottom: 0.5in;} p {padding-left: 3em;} img {padding-right: 30px;}
    padding:
    °øÅë
    ±Ô°Ý
    h1 {padding: 2ex;}
    div {padding: 3px 4px 5px 6px } À§, ¿ì, ÇÏ, Á ½Ã°è¹æÇâÀ¸·Î ÁöÁ¤
  • »óÇÏ, Á¿ì padding µÎ²²¸¦ ÁöÁ¤ ÇÑ´Ù. À½¼ö´Â Çã¿ëµÇÁö ¾Ê´Â´Ù.
  • ±æÀÌ, ¹éºÐÀ², auto
  • space
    border-top-width: border-bottom-width: border-left-width: border-right-width:
    ±Ô°Ý ±Ô°Ý ±Ô°Ý ±Ô°Ý
    ul {border-top-width: 0.5in;} ul {border-bottom-width: 0.5in;} p {border-left-width: 3em;} img {border-right-width: 30px;}
    border-width
    °øÅë
    ±Ô°Ý
    h1 { border-width: 2px 3px }
    div {border-width: 3px 4px 5px 6px } À§, ¿ì, ÇÏ, Á ½Ã°è¹æÇâÀ¸·Î ÁöÁ¤
  • »óÇÏ, Á¿ì borderÀÇ µÎ²²¸¦ ÁöÁ¤ ÇÑ´Ù. À½¼ö´Â Çã¿ëµÇÁö ¾Ê´Â´Ù.
  • thin, medium, thick, ±æÀÌ
  • ÀÚüÀûÀÎ foreground Ư¼ºÀ» °¡Áú ¼ö ÀÖ´Ù.
  • space
    border-top: border-bottom: border-left: border-right:
    ±Ô°Ý ±Ô°Ý ±Ô°Ý ±Ô°Ý
    ul {border-top: 0.5in solid black;} ul {border-bottom: 0.5in grooved green;} p {border-left: 3em solid gray;} img {border-right: 30px dotted blue;}
    border:
    °øÅë
    ±Ô°Ý
    h1 {border: 2px;}
    a:visited { border: thin dotted #800080 }
  • À­ÂÊ borderÀÇ µÎ²²(width), »ö»ó(color) ¹× Ư¼º(style)À» ÁöÁ¤ ÇÑ´Ù.
  • °ªÀº border-top-width, border-style, color
  • space
    border-color:

    ±Ô°Ý
    borderÀÇ »ö»ó¸¦ ÁöÁ¤ ÇÑ´Ù.(»ö»óÇ¥)
    color, rgb number
    »ç¹æÀÇ length, style, color¸¦ µ¿ÀÏÇÏ°Ô ¸¸ ÁöÁ¤µÈ´Ù.
    h1 {border-color: purple; border-style: solid;}
    div {border-color: ffffff red blue yellow }
    À§, ¿ì, ÇÏ, Á ½Ã°è¹æÇâÀ¸·Î ÁöÁ¤
    border-style:

    ±Ô°Ý
    borderÀÇ Æ¯¼ºÀ» ÁöÁ¤ ÇÑ´Ù.
    none, dotted, dashed, solid, double, groove, ridge, inset, outset
    h1 {border-color: purple; border-style: solid;}
    space
    width:
    ±æÀÌ, ¹éºÐÀ², auto
    ±Ô°Ý
    Æø(width)¸¦ ÁöÁ¤ÇÑ´Ù. À½¼ö´Â Çã¿ëµÇÁö ¾Ê´Â´Ù.
    À̹ÌÁö Æø ÁöÁ¤¿¡ ¸¹ÀÌ »ç¿ë´Âµ¥ ´Ù¸¥ block ¿¡¼­µµ »ç¿ë µÈ´Ù.
    table {width: 80%;}
    height:
    ±æÀÌ, auto
    ±Ô°Ý
    ³ôÀÌ(height)¸¦ ÁöÁ¤ÇÑ´Ù.
    img.icon {height: 50px;}
    space
    float:
    left, right, none

    ±Ô°Ý
    ¿¤·¹¸àÆ®°¡ ¿òÁ÷ÀÌ´Â(float) °ÍÀ» ÁöÁ¤ÇÑ´Ù.
      html¿¡¼­ <align=left>¿Í °°Àº ±â´ÉÀÌ´Ù,
      ÀϹÝÀûÀ¸·Î ÅؽºÆ® À̹ÌÁö¿¡ »ç¿ëÇϳª
      ´Ù¸¥ ¿¤·¹¸àµå¿¡µµ »ç¿ë ÇÒ ¼ö ÀÖ´Ù.
    img {float: left;}
    clear:
    left, right, both, none

    ±Ô°Ý
    html¿¡¼­ <br clear=left/right/all/none>°ú ºñ½Á
    float ¿¤·¹¸àÆ®¿¡¼­ ÀÛµ¿ ÁöÁ¤
    h1 {clear: both;}
    h1 {clear: left;} h1 ¹®ÀÚ´Â left¸¦ ÇÇÇؼ­ ³ªÅ¸³²
    space
    ¿¹Á¦
    
    <STYLE type="text/css">
    .box1 { color:blue; background:#cfffff;  line-height:12pt;
      font-family: ±¼¸²; font-size: 10pt; font-weight: bold; font-style: normal;
      margin-left: 20px;
      padding-top:1; padding-bottom:6; padding-left:11; padding-right:16;
      border-color: #aaffee #006600 #ff6600 #eeffaa; border-style:solid;
      border-top-width:16; border-bottom-width:12;
      border-left-width:8; border-right-width: 20;
    }
    </STYLE>
    
    <table border=1 width=68% class=box1>
    <tr><td>test of ÅؽºÆ®</td>
    <td>and ¹Ú½º together</td></tr>
    <tr><td>¹ÛÀº border</td>
    <td>¾ÈÀº padding</td></tr>
    </table>
    °á°ú
    test of ÅؽºÆ®and ¹Ú½º together
    ¹ÛÀº border¾ÈÀº padding

    ¼Ò°³ ÀÏ¹Ý ÅؽºÆ® ÆùÆ® ¹Ú½º »ö»ó ¸ñ·Ï »öÀÎ ¿¹Á¦
    ¹ø¿ª¹® ¼ÒÀ¯ÀÚ - Trio ȨÆäÀÌÁö Á¦°ø
    ÀÌ ¹®¼­(http://trio.co.kr/webrefer/css/cssbox.html)´Â
    ÀÚÀ¯·ÎÀÌ ¿¬°á »ç¿ëÀÌ °¡´ÉÇÔ.
    ¿¹Á¦ ¸Þ´º·Î