프로그래밍/javascript

CSS inline & block

세틴 2009. 2. 13. 18:15

스크립트에서 디스플레이 설정할때..

block  과 inline 의 차이점

 

block The element will be displayed as a block-level element, with a line break before and after the element
inline Default. The element will be displayed as an inline element, with no line break before or after the element

 

block 같은 경우에는 line break 가 자동으로 먹는다는거죠..

inline 같은 경우에는 line break 가 없다는 거고

기본은 inline 입니다.

 

그래서 style.display='' 로 하면 inline 이 되는거죠~..

아무 차이점이 없는 줄 알고 썼다가 애를 먹었다는..