&

티스토리 문단간격 이전 작성 글에 적용 안되는 방법 해결하는 방법

취업해요진 2023. 2. 3. 10:41

 

본문을 tt_article_useless_p_margin을 클래스 값으로 하는 div로 감싸고, 그 안의 문단에는 다음과 같은 CSS 코드가 적용

.tt_article_useless_p_margin p {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

 

 

다음과 같은 코드를 스킨 편집 CSS 맨 마지막 줄에 추가하면 된다.
티스토리가 뿌리는 스타일에 !important;가 먹혀 있기 때문에 아무리 상속을 태워도 무력화되지 않는다.
대신 좀 더 상위 상속으로부터 !important;를 부여하면 문단 뒤에 공백을 줄 수 있다.

.entry-content .tt_article_useless_p_margin p { margin-bottom:22px !important;}