2013-02-13 2 views
0

만을 요소 개요 마십시오내가 이것을 가지고 어떻게 HTML

그것은 나에게 제목이 종료 과거의 방법을 종료 회색 점선 제목을 제공
< h1 style="position: relative; top: -103px; left: 700px; border-width: thin; border-style: dotted; border-color: grey;"> 
< small>Three Stars Of The Week</small> 
</p> 

. 페이지의 마지막 부분으로 이동합니다.

국경이 글자 만 돌아가며 페이지 끝까지 가도록 수정하려면 어떻게해야합니까?

답변

1

h1은 블록 수준 요소이므로 예상되는 동작입니다. 내용을 인라인 요소 (예 : span)에 넣고 대신 스타일을 지정하십시오.

0

<h> (header 1 to 6) 태그는 블록 요소이므로 페이지의 처음부터 끝까지 걸릴 것입니다. display:inline-block을 사용해보세요. 이

같은 뭔가 귀하의 CSS 클래스

.head-class{ 
    position:relative; 
    top: -103px; 
    left: 700px; 
    border-width: thin; 
    border-style: dotted; 
    border-color: grey; 
    display:inline-block; /* style to make element as inline but block */ 
} 

귀하의 요소

< h1 class="head-class"><small>Three Stars Of The Week</small></h1><br> 
관련 문제