티스토리 뷰

Web:

iframe 사용시 하단에 발생하는 공백 제거방법


| 시작하기에 앞서


iframe 을 사용하다 보면 하단에 하얀 공백이 생길때가 있다. 그때 해결할 방법은 아래와 같다.


| 해결 방법

  • https://stackoverflow.com/questions/7290214/html-strange-space-between-iframe-elements

An iframe in standards mode is display: inline by default. That means they will be placed on the text baseline, ie. where the bottom of an 'a' ends, not where the bottom of a 'y' does. The gap you're seeing is the space for descenders in the line of text. This should remove it:

  • iframe의 기본 display가 inline이기 때문에 발생한다. 따라서, display 속성을 block으로 주기만 하면 된다!


댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
TAG
more
«   2024/03   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
글 보관함