Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- map()
- 백준알고리즘
- 배열과 연결리스트의 차이
- 객체
- display : none
- 배열의 내림차순
- innerhtml
- 양방향 연결리스트
- Sort
- Link
- classList.contains(string)
- for..of
- disabled
- nth-child()
- 일반 형제 선택자 결합
- CSS
- Array.from()
- 단방향 연결리스트
- 가상 요소 선택자
- visibility : hidden
- invalid assignment left-hand side
- 등차수열의 항 찾기
- 범용 선택자
- Em
- filter()
- 고차함수
- 인접 형제 선택자 결합
- indexOf
- 쌍방향 연결리스트
- 배열의 오름차순
Archives
- Today
- Total
프론트엔드 센트럴파크 (☞゚ヮ゚)☞
text-align - text 정렬 본문
See the Pen Untitled by Jeong-Dagyeong (@jeong-dagyeong) on CodePen.
p 태그는 block요소이기 때문에 가로길이에 맞추어서 text가 정렬된다.
span 태그는 inline요소이기 때문에 내용물의 길이에 따라서 맞춰지기 때문에 text-align이 적용되지 않는다.
만약 span태그 안의 text 위치를 옮기고 싶으면
.container {
text-align: center;
}
div태그(block요소이기 때문)에 text-align을 적용하면 된다.
'CSS' 카테고리의 다른 글
text-decoration : 글자에 라인 더하기 (0) | 2022.07.08 |
---|---|
text-indent - 들여쓰기 (0) | 2022.07.06 |
letter-spacing, word-spacing - 글자 간격 (0) | 2022.07.06 |
font와 단축속성 (0) | 2022.07.06 |
상속 제어하기 - initial, inherit, unset (0) | 2022.07.04 |
Comments