그래서 내부에 div와 몇 개의 스팬이있는 테이블 레이아웃을 시뮬레이트하고 있습니다. 오른쪽의 스팬을 감싸는 텍스트를 들여 쓰기하고 싶습니다. 저는 몇 가지 시도를 해봤지만 제대로 작동하지 않습니다. 어떤 도움을 주시면 감사하겠습니다.<span> 들여 쓰기 래핑 된 텍스트
jsFiddle : http://jsfiddle.net/2Wbuv/
HTML
<div class="display-element">
<span class="display-label">Field 1</span>
<span class="display-field">This is my string of data, some times it is pretty long. Sometimes it is not. This one is.</span>
</div>
<div class="display-element">
<span class="display-label">Field 2</span>
<span class="display-field">This is another string of data.</span>
</div>
CSS
.display-element {}
.display-label {display: inline-block;
width: 100px;
padding-left: 5px;}
.display-field {display: inline;}
'display : table-cell'을 사용하지 않는 이유는 무엇입니까? – sdleihssirhc
음, 천재 ... 전에는 그걸 사용 해본 적이 없지만 왜 그런지 모르겠습니다. 대답 해주세요. 당신에게 점수를 줄 수 있어요. –
아, 이제는 100 % 너비로 만들 수 없지만 ... 계속 노력하고 있습니다. –