°³Ã¼°¡ ¾î¶»°Ô À¯µ¿µÇ´Â°¡¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù.
none | µðÆúÆ®À̸ç, ÅؽºÆ®°¡ ³ªÅ¸´Â °÷¿¡ °³Ã¼°¡ µð½ºÇ÷¹À̵ȴÙ. |
left | ÅؽºÆ®°¡ °³Ã¼ÀÇ ¿À¸¥ÂÊ¿¡ È帥´Ù. |
right | ÅؽºÆ®°¡ °³Ã¼ÀÇ ¿ÞÂÊ¿¡ È帥´Ù. |
ÀÌ ¼Ó¼ºÀº currentStyle¿¡¼´Â ÀбâÀü¿ëÀÌ°í, ±×¿ÜÀÇ °³Ã¼¿¡¼´Â Àбâ/¾²±âÀ̸ç, µðÆúÆ®°ªÀº noneÀÌ´Ù.
CSS(Cascading Style Sheets) ¾ÖÆ®¸®ºäÆ®´Â »ó¼ÓµÇÁö ¾Ê´Â´Ù.
left³ª right °ªÀ¸·Î °³Ã¼´Â ºí·°·¹º§·Î Ãë±ÞµÇ°í, display ¼Ó¼ºÀº ¹«½ÃµÈ´Ù. ¿¹¸¦µé¾î À¯µ¿ ¹®´ÜµéÀº ÆäÀÌÁö¿¡ ³ª¶õÈ÷ ³ªÅ¸³¯ ¼ö ÀÖµð.
À¯µ¿ °³Ã¼ ´ÙÀ½¿¡ ³ª¿À´Â °³Ã¼Àº À¯µ¿°³Ã¼ÀÇ À§Ä¡¿¡ »ó´ëÀûÀ¸·Î À̵¿ÇÑ´Ù.
À¯µ¿ °³Ã¼´Â ÀÎÁ¢ÇÑ ´Ù¸¥ ºí·°·¹º§ °³Ã¼ÀÇ Å׵θ®, Æеù ȤÀº ¸¶Áø¿¡ µµ´ÞÇÒ ¶§±îÁö ¿ÞÂÊ, ȤÀº ¿À¸¥ÂÊÀ¸·Î À̵¿ÇÑ´Ù.
float ¾ÖÆ®¸®ºäÆ®°¡ Ç¥ÇöµÇ±âÀ§ÇÏ¿© div°ú span °³Ã¼´Â ³Êºñ¸¦ °¡Á®¾ßÇÑ´Ù.
IE5¿¡¼ div°ú span °³Ã¼´Â µðÆúÆ®·Î ÇÒ´çµÈ ³Êºñ¸¦ °®À¸¹Ç·Î, ³Êºñ¸¦ ÁöÁ¤ÇÏÁö ¾Ê¾Æµµ Ç¥ÇöµÈ´Ù.
°³Ã¼ | script | CSS | IE ¹öÀü |
---|
ÀÌ ¼Ó¼ºÀº CSS1(Cascading Style Sheets, Level 1)¿¡¼ Á¤ÀǵǾú´Ù.
imgObj | |||
span1Obj | |||
span2Obj |
¼¼°³ÀÇ °³Ã¼¸¦ float ¾ÖÆ®¸®ºäÆ®¸¦ »ç¿ëÇá¿© À¯µ¿½ÃÄ×´Ù,
<STYLE>table.sample tr td button{width:100}</STYLE><! sample classÀÇ table ¼Ó tr ¼Ó td ¼Ó ¸ðµç button ¿¤·¹¸àÆ®¿¡ Àû¿ë>
<DIV style="border:solid 1 red;width:400;height:150">
<IMG id=imgObj src=../../gif/tulip.gif border=1 alt="À̹ÌÁö">
<SPAN id=span1Obj style="border:solid 1 green;background:cfc">DIV Áß SPAN 1 ¹®ÀÚ¿</SPAN>
<SPAN id=span2Obj style="border:solid 1 green;background:ccf">DIV Áß SPAN 2 ¹®ÀÚ¿</SPAN>
</DIV>
<TABLE border=1 class=sample width=400>
<TR>
<TD>imgObj</TD>
<TD><BUTTON onclick="imgObj.style.styleFloat='left';">left</BUTTON></TD>
<TD><BUTTON onclick="imgObj.style.styleFloat='right';">right</BUTTON></TD>
<TD><BUTTON onclick="imgObj.style.styleFloat='none';">none</BUTTON></TD>
</TR>
<TR>
<TD>span1Obj</TD>
<TD><BUTTON onclick="span1Obj.style.styleFloat='left';">left</BUTTON></TD>
<TD><BUTTON onclick="span1Obj.style.styleFloat='right';">right</BUTTON></TD>
<TD><BUTTON onclick="span1Obj.style.styleFloat='none';">none</BUTTON></TD>
</TR>
<TR>
<TD>span2Obj</TD>
<TD><BUTTON onclick="span2Obj.style.styleFloat='left';">left</BUTTON></TD>
<TD><BUTTON onclick="span2Obj.style.styleFloat='right';">right</BUTTON></TD>
<TD><BUTTON onclick="span2Obj.style.styleFloat='none';">none</BUTTON></TD>
</TR>
</TABLE>