본문으로 바로가기

[css trick] text-align : justify

category 퍼블리싱/TIP 2017. 9. 22. 23:52

div 안에 글을 정렬할 때 text-align 을 많이 사용한다. 

이 중에 justify 속성은 div의 폭에 맞춰 글을 정렬하는 것이다.

허나 영문이 아닌 아시아 언어는 이 속성이 제대로 적용되지 않는다. 




이      름 :

핸 드 폰 : 

우편번호 : 



표현하자면 이런식일까? 

이름, 핸드폰, 우편번호라는 라벨을 text-align: justify 로 정렬해보지만 제대로 되지 않는다.


1
2
3
<div class="justifyAsia">이 름</div>
<div class="justifyAsia">핸드폰</div>
<div class="justifyAsia">우편번호</div>
cs


1
2
3
4
5
6
7
8
9
.justifyAsia {
  width: 200px;
  text-algin:justify;
}
.justifyAsia:after {
  content: "";
  display: inline-block;
  width: 100%;
}
cs


이러면 된다.


'퍼블리싱 > TIP' 카테고리의 다른 글

트윈맥스 TweenMax  (0) 2017.09.27
BEM(Block Element Modifier)에 관하여  (0) 2016.06.22
개인정보보호방침  (0) 2016.05.18
모바일전용사이트 분기시키기  (0) 2016.04.21
모바일웹에서의 FOOTER  (0) 2016.04.06