Å×ÀÌºí ·¹À̾ƿôÀÌ °íÁ¤(fixed)µÇ´Â°¡¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù.

Àμö
cssSelector : (½ºÅ¸ÀÏ ¼±ÅÃÀÚ)
¼Ó¼ºÀ» °¡Áú¼ö ÀÖ´Â ¿¤·¹¸àÆ®()³ª Ŭ¶ó½º(class) À̸§ ȤÀº ÀνÄÀÚ(id)ÀÌ´Ù.

: (¼Ó¼º ¹®ÀÚ¿­)
½ºÅ¸ÀÏ ¼Ó¼ºÀº Å×ÀÌºí ·¹À̾ƿôÀÌ °íÁ¤(fixed)µÇ´Â°¡¸¦ ³ªÅ¸³»´Â ¹®ÀÚ¿­ÀÌ´Ù.

auto µðÆúÆ®À̸ç, Ä÷³ ³Êºñ°¡ ³»¿ëÀÇ ÁٹٲÞÀÌ Àû°Ô °¡Àå ³Ð°Ô ÀÚµ¿À¸·Î ¼³Á¤µÈ´Ù.
fixed Å×À̺í°ú Ä÷³ ³Êºñ°¡ °¢ col °³Ã¼ ³ÊºñÀÇ ÇÕ»êÀ̳ª, ÁöÁ¤µÇÁö ¾Ê¾ÒÀ¸¸é óÀ½ ÁÙÀÇ Ä­µéÀÇ ³Êºñ ÇÕ»êÀ¸·Î °íÁ¤µÈ´Ù. Å×À̺íÀÇ ³Êºñ°¡ ÁöÁ¤µÇÁö ¾Ê¾ÒÀ¸¸é, µðÆúÆ®¿¡ ÀÇÇÏ¿© ÀÚµ¿ÀûÀ¸·Î ³»¿ëÀÌ ÁٹٲÞÀÌ Àû°ÔµÇ´Â ¹æÇâÀ¸·Î ÀÌ width °ªÀº 100%°¡ µÈ´Ù.

ÀÌ ¼Ó¼ºÀº currentStyle¿¡¼­´Â ÀбâÀü¿ëÀÌ°í, ±×¿ÜÀÇ °³Ã¼¿¡¼­´Â Àбâ/¾²±âÀ̸ç, µðÆúÆ®°ªÀº autoÀÌ´Ù.

CSS(Cascading Style Sheets) ¾ÖÆ®¸®ºäÆ®´Â »ó¼ÓµÇÁö ¾Ê´Â´Ù.

Ư±â

tableLayout ¼Ó¼ºÀ» »ç¿ëÇÏ¿© Å×À̺íÀÇ Ç¥ÇöÀ» ÃÖÀûÈ­ÇÒ ¼ö ÀÖ´Ù. ExplorerÀº ÀÌ ¼Ó¼ºÀ¸·Î »ç¿ëÀÚ¿¡°Ô ºü¸¥ ¹æ½ÄÀ¸·Î Á¤º¸¸¦ Á¦°øÇÏ°í Å×À̺íÀ» ÇÑ ÁÙ¾¿ Ç¥ÇöÇÑ´Ù. tableLayout ¼Ó¼ºÀº ´ÙÀ½ °úÁ¤À» ÅëÇÏ¿© ÇÑ Å×À̺íÀÇ Ä÷³ ³Êºñ¸¦ °áÁ¤ÇÑ´Ù.

  1. colÀ̳ª colGroup¿¤·¹¸àÆ®ÀÇ width ¼Ó¼ºÀ» »ç¿ëÇÑ´Ù.
  2. ù¹ø° ÁÙ¿¡ ÀÖ´Â td¿¤·¹¸àÆ®ÀÇ width ¼Ó¼ºÀ» »ç¿ëÇÑ´Ù.
  3. ³»¿ëÀÇ Å©±â¿¡ °ü°è¾øÀÌ Å×À̺íÀÇ Ä÷³µéÀ» ¼­·Î °°°Ô ºÐÇÒÇÑ´Ù.
  4. Ä­ ³»¿ëÀÇ Å©±â°¡ Ä÷³¿¡ °íÁ¤µÈ ³Êºñ¸¦ ÃÊ°úÇϸé, ÁٹٲÞÀÌ °¡´ÉÇÏ¸é ³»¿ëÀÌ ÁٹٲÞÇϰųª, Àß·Á(clip)Áø´Ù.
  5. tableLayout ¼Ó¼ºÀÌ fixed·Î ¼³Á¤µÇ¾úÀ¸¸é, overflow ¼Ó¼ºÀÌ ³»¿ëÀÇ td ¿¤·¹¸àÆ® ³Êºñ ³ÑħÀ» ó¸®Çϱâ À§ÇÏ¿© »ç¿ëµÉ ¼ö ÀÖ´Ù.
  6. height°¡ ¼³Á¤µÇ¾úÀ¸¸é, ±× ¼³Á¤µÈ ³ôÀ̸¦ ÃÊ°úÇÏ´Â ³»¿ëÀº Àß·ÁÁø´Ù.

tableLayout ¼Ó¼ºÀ» fixed·Î ¼³Á¤Çϸé, Å×À̺í Ç¥ÇöÀÇ ¼Óµµ¸¦ ÇöÀúÈ÷ Áõ°¡½ÃŲ´Ù.

ÁÙÀÇ height ¼³Á¤µµ ºê¶ó¿ìÀú°¡ Ç¥ÇöÇϱâ Àü¿¡ Å×ÀÌºí ³»¿ëÀ» Á¡°ËÇÏ´Â °ÍÀÌ »ý¶ôµÇ¹Ç·Î Ãß°¡ÀûÀ¸·Î Å×À̺í Ç¥Çö ¼Óµµ¸¦ Áõ°¡½ÃŲ´Ù.

Àû¿ë
°³Ã¼scriptCSS IE ¹öÀü
ÂüÁ¶
width, width

ÀÌ ¼Ó¼ºÀº CSS2(Cascading Style Sheets Level 2)¿¡¼­ Á¤ÀǵǾú´Ù.


td 1-1td 1-2td 1-3
td 2-1td 2-2td 2-3
td 3-1td 3-2td 3-3
td 4-1td 4-2td 4-3
tableObj.style.tableLayout=°á°ú Ç¥½Ãâ
<STYLE>.but{widht:100}</STYLE>
<SCRIPT>
function doShow(){
  showA.innerText='tableObj.style.tableLayout='+tableObj.style.tableLayout;
}
</SCRIPT>
<TABLE id="tableObj" style="table-layout:fixed" width=500 border=1 cellpadding=5 cellspacing=7>
<COL width=100><COL width=50><COL width=300>
<TR height=10>
<TD>td 1-1</TD><TD>td 1-2</TD><TD>td 1-3</TD>
</TR>
<TR height=20>
<TD>td 2-1</TD><TD>td 2-2</TD><TD>td 2-3</TD>
</TR>
<TR height=30>
<TD>td 3-1</TD><TD>td 3-2</TD><TD>td 3-3</TD>
</TR>
<TR height=40>
<TD>td 4-1</TD><TD>td 4-2</TD><TD>td 4-3</TD>
</TR>
</TABLE>
<BUTTON
  onclick="tableObj.style.tableLayout='auto';showA.innerText=tableObj.style.tableLayout"
  class=but>tableLayout='auto'</BUTTON>
<BUTTON
  onclick="tableObj.style.tableLayout='fixed';;showA.innerText=tableObj.style.tableLayout"
  class=but>tableLayout='fixed'</BUTTON>
<DIV>tableObj.style.tableLayout=<SPAN id=showA style=color:blue>°á°ú Ç¥½Ãâ</SPAN></DIV>