웹오피스
html 테이블 리사이즈
창의력대장3
2018. 9. 2. 22:56
html 테이블 리사이즈
1. 진실
1) td style width/height
- offsetWidth/Height 에서 cell border, table border-collapse, table cellpadding 을 빼준값
2) colgroup style width
- td offsetWidth 값과 같다
- 열에 colspan 이 1인 셀이 없다면, 양옆 열의 허용범위 중 중간값으로 설정
3) tr style height
- td의 offsetHeight 값과 같다
4) 행/열 최초 리사이즈 시, offsetWidth/offsetHeight로 cell width/height 값을 셋팅하고, 그 이후로 부터는 style width/height 값으로 리사이즈를 진행한다
- 최초 cell 이 올바른 style width/height 를 가지고 있지 않은 경우가 많음
2. 의심 되는것
1) table style width
- colgroup width 값과 같다 or colgroup width +1 값과 같다 (???)