css문의

css문의

QA

css문의

본문

#container_box {z-index:4;position:relative;float:left;padding:15px 16px 15px 15px;width:900px;min-height:900px;height:auto !important;height:500px;background:#fff;font-size:1em;zoom:1}
#container_box .container_title {text-align: left;color: #000000;font-size: 44px;font-weight: bold;padding-bottom: 10px;width:auto;}
#container_box .bgtitle {background:url('../img/title_underline.gif') left top no-repeat;background-color: #2076b7;height: 6px;}

 

<div class="container_title"><?php echo $board['bo_subject'] ?><div class="bgtitle"></div></div>

이거인데

 

bgtitle이 container_title 맞춰서 가로 사이즈가 자동으로 만들어지게 하고 싶은데 어떻게 하나요?

이 질문에 댓글 쓰기 :

답변 4

<div class="container_title"><span>자유게시판</span></div>

.container_title{font-size: 44px;font-weight: bold;padding-bottom: 10px;}
.container_title span{ background: url(../img/title_underline.gif) repeat-x left bottom; }

#container_box .bgtitle {background:url('../img/title_underline.gif') left top no-repeat;background-color: #2076b7;height: 6px;}

 

아래처럼 수정하세요

 

#container_box .bgtitle {background:url('../img/title_underline.gif') center repeat-x;background-color: #2076b7;height: 6px;}

#container_box .container_title { display:inline-block;    text-align: left;color: #000000;font-size: 44px;font-weight: bold;padding-bottom: 10px;width:auto;}

이렇게 하시면 됩니다. 

display를 inline-block으로 지정하시면 되어요 

답변을 작성하시기 전에 로그인 해주세요.
전체 123,663 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT