관리 메뉴

이사작전.com IT Blog

[CSS] <span> not working margin-top 본문

Front/CSS

[CSS] <span> not working margin-top

말랑고양 플랫폼공작소 2017.10.12 11:50

span is an inline element that doesn't support vertical margins.

Put the margin on the outer div instead.


Use <p> tag instead of <span> tag.


or


span {
    display:inline-block; /*or display:block;*/
}


thank!


#span #p #span not working #margin-top

reference : https://stackoverflow.com/questions/11700985/margin-top-not-working-for-span-element

0 Comments
댓글쓰기 폼