라디오 버튼 정렬 문제

라디오 버튼 정렬 문제

QA

라디오 버튼 정렬 문제

답변 1

본문

 

그림과 같이 1번과 2번의 높이가 안맞는 문제가 생기네요.

파일 찾아보기를 없애면, 라디오 버튼의 높이 수평이 맞게 되는데,

파일 찾아보기를 추가하면 저렇게 됩니다.

 

밑에는 파일첨부 하는 부분 코드입니다.

 


<span class="func"> <input type="file" class="fb w50" placeholder="" name="a_file" /> <span class="gf">테스트 </span></span>

 

 

관련 css 를 이것저것 수정해봤는데 잘 안되서 여쭤봅니다

어떤 것을 수정해야, 어긋나게 나오지 않을까요?

이 질문에 댓글 쓰기 :

답변 1

<label for="a_file">
<span class="func"> <input type="file" id="a_file" placeholder="" name="a_file" /></span>
</label>

 

이렇게 label로 감싸 보시죠.

아 빠뜨려서 죄송합니다. label 로 감싸져 있는 상태입니다.



<div class="radio5">

<label class="radio_cus">
<input name="type2" id="type2" type="radio" value="1" class="m1"> 1번
</label>

<label class="radio_cus">
<input name="type2" id="type2" type="radio" value="2" class="m1"> 2번
 <span class="func"> <input type="file" id="a_file" placeholder="" name="a_file" /></span>
 </label>

</div>

네, 그렇지만 label태그 속성에는 for가 필요하고 for값으로는 대상 id가 필요합니다. 예를 들어 삑사리님의 소스에서 <label for="type2"><input name="type2" id="type2" type="radio....등등 이런 식으로 되어야 합니다. 다시 시도해 보시죠. 제 경우는 IE10,크롬최신판에서 잘 되는데요.

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 125,873
© SIRSOFT
현재 페이지 제일 처음으로