이미지 가운데 정렬
본문
이미지(img 태그) 가운데 정렬을 하고 싶다면
다음과 같이 처리하면 된다!(style 속성 이용)
<img src="top_logo.jpg" style="margin-left: auto; margin-right: auto; display: block;"/>
img 태그 자체에 속성을 부여하는 것이 뭔가 깔끔하지 못하다는 생각이 든다면
다음과 같이 처리해도 된다!(p 태그로 감싸는 형태!)
<p style="text-align: center;">
<img src="top_logo.jpg"/>
</p>
출처: https://nine01223.tistory.com/147 [스프링연구소(spring-lab)]
댓글목록
등록된 댓글이 없습니다.