내 HTML 문서에 메시지와 라디오 박스가 있습니다. 두 가지를 나란히 표시하고 싶습니다. 메시지는 왼쪽에 정렬되고 오른쪽에 정렬되고 오른쪽에 정렬됩니다. 나는 CSS를 사용하여 "디스플레이 : 인라인"컨테이너를 시도했지만 작동하지 않았다. 여기에 코드입니다 :CSS 위치 지정
HTML :
<div id="test-div">
<p>Current time: <span id="current-time"></span></p>
<fieldset id="fieldset-options">
<legend>My Options</legend>
<input id="opt1" type="radio" name="grp-options" value="1">
<label id="label-opt1" for="opt1">First Option</label><br/>
<input id="opt2" type="radio" name="grp-options" value="2">
<label id="label-opt2" for="opt2">Second Option</label><br/>
<input id="opt3" type="radio" name="grp-options" value="3">
<label id="label-opt3" for="opt3">Third Option</label><br/>
</fieldset>
</div>
CSS :
#test-div {
font-size : 18px;
font-weight: bold;
margin-bottom: 20px;
position: relative;
//display: inline;
}
#test-div #fieldset-options legend {
font-size: 16px;
font-weight : bold;
}
#test-div #fieldset-options {
font-size : 14px;
font-weight: normal;
width: 350px;
position: absolute;
right: 0px;
}
이 jsfiddle link입니다. 이것을 올바르게 조정하는 방법을 알려주십시오.
여기에 모두 설명되어 있습니다. http://www.alistapart.com/articles/prettyaccessibleforms –
@Diodeus, 링크를 통해 그것을 주셔서 감사합니다. – Methos