잡동사니

반응형

질문

Chrome에서 예상대로 작동하지만 Firefox에서는 작동하지 않는 바이올린이 있습니다.

테이블에 두 가지 요소가 있습니다. 왼쪽 요소의 내용은 매우 짧고 다른 요소의 내용은 매우 깁니다. 두 요소가 표에서 같은 크기 인 것처럼 표시되고 더 긴 요소에는 스크롤바가 있어야합니다.

https://jsfiddle.net/rju1os7m/1/

크롬 (양호) :

Chrome

Firefox (나쁨) :

Firefox

HTML :

<body>
<table border="2" width="200px" height="100px">
<tbody>
  <tr>
    <td width="50%">
      This is a short td
    </td>
    <td width="50%">
      <div style="overflow:auto;width:100%;height:100%;">
        This is a really long td with a lot of text that you have to scroll through it's great
        it's really incredible very cool indeed yes alright everybody thank you
      </div>
    </td>
  </tr>
</tbody>
</table>
</body>

답변1

사용해보십시오

{height:100px;} 

< div >의 경우.



 

 

 

 

출처 : https://stackoverflow.com/questions/62688112/vertically-scrollable-td-in-an-html-table-does-not-work-in-firefox

반응형

이 글을 공유합시다

facebook twitter googleplus kakaoTalk kakaostory naver band