본문 바로가기

   
Programming/CSS

CSS overflow

반응형

CSS overflow

exam.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>

               <title></title>

               <meta name="generator" content="editplus" />

               <meta name="author" content="김종현" />

               <style type="text/css">

                       #div1 {

                              background-color:yellow;

                              width:100px;

                              height:100px;

                              overflow:auto;

                              /*약관동의에 overflow:auto속성을 사용하면 좋다 .iframe 쓴다.*/

                       }

 

 

                       td {

                              width:100px;

                              height:100px;                        

                       }

 

               </style>

        </head>

 

        <body>

               <!-- Ex18_overflow.htm -->

               <div id="div1">

                       내용물입니다.내용물입니다.내용물입니다.내용물입니다.내용물입니다.내용물입니다.내용물입니다.내용물입니다.

               </div>

               <hr />

 

               <table border="1">

               <tr>

                       <td>내용</td>

                       <td>

                              <div style="width:100%; height:100%; overflow:auto;">

                              테이블속성에선 스타일시트에 오버플로우가 먹지 않지만 div태그를 안에서 사용하여 오토속성을 넣어줄수 있다.

                              </div>

                       </td>

               </tr>

               </table>

        </body>

</html>


결과



반응형