2016-09-09 3 views
0

줄 바꿈이있는 경우 레이블 및 확인란 (또는 라디오 단추)의 분리를 방지하려고합니다. 불행히도 저는 통제 할 수없는 아주 긴 레이블을 가지고 일하고 있습니다.확인란/라디오 단추 줄 바꿈 문제

모든 버튼이 정렬 된 열이있을 수 있지만 최소한 항목을 위로 나눌 필요가 없다면 정말 좋을 것입니다.

미리 감사드립니다. 선택 그룹

@import url(http://fonts.googleapis.com/css?family=Montserrat); 
 

 
/*basic reset*/ 
 
* {margin: 0; padding: 0;} 
 

 
.html_S { 
 
\t height: 100%; 
 

 
} 
 
.toast { 
 
    opacity: 1 !important; 
 
} 
 
.body_S { 
 
    min-height: 100%; 
 
    margin: 0; 
 
    background-repeat: no-repeat; 
 
    background-attachment: fixed; 
 
\t font-family: montserrat, arial, verdana; 
 
\t background-color: transparent !important; 
 
} 
 

 
.reqSpan_S { 
 
    top: -15px; 
 
\t position:relative; 
 
} 
 

 
.reqFieldText_S { 
 
    color: red; 
 
    padding: 0; 
 
    margin: 0; 
 
} 
 

 
.reqFieldStar_S { 
 
    font-weight: bold; 
 
} 
 
.k-button { 
 
    color: red; 
 
} 
 

 
.buttonCentre_S { 
 
    text-align: center; 
 
} 
 

 
.outerDiv_S { 
 
    width: 85%; 
 
    margin: 50px auto; 
 
    text-align: center; 
 
} 
 
#surveyForm { 
 
\t top: -35px; 
 
\t position:relative; 
 
    width: 85%; 
 
\t margin: 50px auto; 
 
\t text-align: left; 
 
} 
 
#surveyForm fieldset { 
 
\t background: white; 
 
\t border: 0 none; 
 
\t border-radius: 3px; 
 
\t box-shadow: 0 0 15px 1px rgba(0, 0, 0, 0.4); 
 
\t padding: 20px 30px; 
 
\t 
 
\t box-sizing: border-box; 
 
\t width: 80%; 
 
\t margin: 0 10%; 
 
} 
 

 
/*inputs*/ 
 
#surveyForm input, #surveyForm textarea { 
 
\t padding: 15px; 
 
\t border: 1px solid #ccc; 
 
\t border-radius: 3px; 
 
\t margin-bottom: 10px; 
 
\t width: 100%; 
 
\t box-sizing: border-box; 
 
\t font-family: montserrat; 
 
\t color: #2C3E50; 
 
\t font-size: 13px; 
 
} 
 
/*buttons*/ 
 
#surveyForm .action-button { 
 
    text-align: center; 
 
\t width: 100px; 
 
\t background: #27AE60; 
 
\t font-weight: bold; 
 
\t color: white; 
 
\t border: 0 none; 
 
\t border-radius: 1px; 
 
\t cursor: pointer; 
 
\t padding: 10px 5px; 
 
\t margin: 10px 5px; 
 
} 
 
#surveyForm .action-button:hover, #surveyForm .action-button:focus { 
 
\t box-shadow: 0 0 0 2px white, 0 0 0 3px #27AE60; 
 
} 
 
#surveyForm .action-button-submit { 
 
\t width: 100px; 
 
\t background: #3498db; 
 
\t font-weight: bold; 
 
\t color: white; 
 
\t border: 0 none; 
 
\t border-radius: 1px; 
 
\t cursor: pointer; 
 
\t padding: 10px 5px; 
 
\t margin: 10px 5px; 
 
} 
 

 
/*For Toast not part of surveyForm...*/ 
 
.action-button-ok { 
 
\t width: 100px; 
 
\t background: rgba(255, 255, 255, 0.3); 
 
\t font-weight: bold; 
 
\t color: white; 
 
\t border: 0 none; 
 
\t border-radius: 1px; 
 
\t cursor: pointer; 
 
\t padding: 10px 5px; 
 
\t margin: 10px 5px; 
 
} 
 

 
#surveyForm .action-button-submit:hover, #surveyForm .action-button-submit:focus { 
 
\t box-shadow: 0 0 0 2px white, 0 0 0 3px #3498db; 
 
} 
 
/*headings*/ 
 
.fs-title { 
 
\t font-size: 15px; 
 
\t text-transform: uppercase; 
 
\t color: #2C3E50; 
 
\t margin-bottom: 10px; 
 
} 
 
.fs-subtitle { 
 
\t font-weight: normal; 
 
\t font-size: 13px; 
 
\t color: #666; 
 
\t margin-bottom: 20px; 
 
} 
 
/*progressbar*/ 
 
#progressbar { 
 
\t margin-bottom: 30px; 
 
\t overflow: hidden; 
 
\t /*CSS counters to number the steps*/ 
 
\t counter-reset: step; 
 
} 
 
#progressbar li { 
 
\t list-style-type: none; 
 
\t color: white; 
 
\t text-transform: uppercase; 
 
\t font-size: 9px; 
 

 
\t /* width should be 100 divided by the number of steps */ 
 
\t /* this is set in the code dynamically in javascript */ 
 
\t width: 6.25%; 
 

 
\t float: left; 
 
\t position: relative; 
 
} 
 
#progressbar li:before { 
 
\t content: counter(step); 
 
\t counter-increment: step; 
 
\t width: 20px; 
 
\t line-height: 20px; 
 
\t display: block; 
 
\t font-size: 10px; 
 
\t color: #333; 
 
\t background: white; 
 
\t border-radius: 3px; 
 
\t margin: 0 auto 5px auto; 
 
} 
 
/*progressbar connectors*/ 
 
#progressbar li:after { 
 
\t content: ''; 
 
\t width: 100%; 
 
\t height: 2px; 
 
\t background: white; 
 
\t position: absolute; 
 
\t left: -50%; 
 
\t top: 9px; 
 
\t z-index: -1; /*put it behind the numbers*/ 
 
} 
 
#progressbar li:first-child:after { 
 
\t /*connector not needed before the first step*/ 
 
\t content: none; 
 
} 
 
/*marking active/completed steps green*/ 
 
/*The number of the step and the connector before it = green*/ 
 
#progressbar li.active:before, #progressbar li.active:after{ 
 
\t background: #27AE60; 
 
\t color: white; 
 
} 
 

 
.k-dropdown { 
 
    width: 100%; 
 
} 
 
.k-state-selected.k-state-focused { 
 
    background-color: #27AE60; 
 
    border: 0; 
 
} 
 

 
#surveyForm hr { 
 
    border: 0; 
 
    height: 0; 
 
    border-top: 1px solid rgba(0, 0, 0, 0.1); 
 
    border-bottom: 1px solid rgba(255, 255, 255, 0.3); 
 
\t margin-bottom: 10px; 
 
} 
 

 

 
/* https://stackoverflow.com/a/17541916/1550052 */ 
 

 

 
.rad, 
 
.ckb{ 
 
    cursor: pointer; 
 
    user-select: none; 
 
    -webkit-user-select: none; 
 
    -webkit-touch-callout: none; 
 
    padding: 10px; 
 
} 
 
.rad > input, 
 
.ckb > input{ /* HIDE ORG RADIO & CHECKBOX */ 
 
    visibility: hidden; 
 
    position: absolute; 
 
} 
 
/* RADIO & CHECKBOX STYLES */ 
 
.rad > i, 
 
.ckb > i{  /* DEFAULT <i> STYLE */ 
 
    display: inline-block; 
 
    vertical-align: middle; 
 
    width: 16px; 
 
    height: 16px; 
 
    border-radius: 50%; 
 
    transition: 0.2s; 
 
    box-shadow: inset 0 0 0 8px #fff; 
 
    border: 1px solid #d3d3d3; 
 
    background: #666; 
 
    margin-right: 4px; 
 
} 
 
/* CHECKBOX OVERWRITE STYLES */ 
 
.ckb > i { 
 
    width: 25px; 
 
    border-radius: 3px; 
 
} 
 
.rad:hover > i{ /* HOVER <i> STYLE */ 
 
    box-shadow: inset 0 0 0 3px #fff; 
 
    background: #666; 
 
} 
 
.rad > input:checked + i{ /* (RADIO CHECKED) <i> STYLE */ 
 
    box-shadow: inset 0 0 0 3px #fff; 
 
    background: #27AE60; 
 
} 
 
/* CHECKBOX */ 
 
.ckb > input + i:after{ 
 
    content: ""; 
 
    display: block; 
 
    height: 12px; 
 
    width: 12px; 
 
    margin: 2px; 
 
    border-radius: inherit; 
 
    transition: inherit; 
 
    background: #d3d3d3; 
 
} 
 
.ckb > input:checked + i:after{ /* (RADIO CHECKED) <i> STYLE */ 
 
    margin-left: 11px; 
 
    background: #27AE60; 
 
}
<body class='body_S'> \t 
 

 

 
\t <form id='surveyForm'> 
 
     
 

 
     
 
\t \t <!-- fieldsets --> 
 
\t \t <fieldset > 
 
<h2 class="fs-title"> 
 
\t Demographic Search Criteria 
 
</h2> 
 
<h2 class="fs-subtitle"> 
 
\t The demographic data you select here will be used by planners 
 
</h2> 
 
<h2 class="fs-subtitle"> 
 
\t 1 
 
</h2> 
 
<label>Main Type of Business 
 
</label> 
 
<br /> 
 

 
<label class="ckb" for="cb-638-0"> 
 
<input type="checkbox" name="cb-638" id="cb-638-0" value="3223" /> 
 

 
<i></i>Accommodations 
 
</label> 
 
<label class="ckb" for="cb-638-1"> 
 
<input type="checkbox" name="cb-638" id="cb-638-1" value="3224" /> 
 

 
<i></i>Activities, Attractions & Tours 
 
</label> 
 
<label class="ckb" for="cb-638-2"> 
 
<input type="checkbox" name="cb-638" id="cb-638-2" value="3225" /> 
 

 
<i></i>Association 
 
</label> 
 
<label class="ckb" for="cb-638-3"> 
 
<input type="checkbox" name="cb-638" id="cb-638-3" value="3226" /> 
 

 
<i></i>Convention and Visitors Bureau 
 
</label> 
 
<label class="ckb" for="cb-638-4"> 
 
<input type="checkbox" name="cb-638" id="cb-638-4" value="3227" /> 
 

 
<i></i>Convention Centre 
 
</label> 
 
<label class="ckb" for="cb-638-5"> 
 
<input type="checkbox" name="cb-638" id="cb-638-5" value="3228" /> 
 

 
<i></i>Cruise Line 
 
</label> 
 
<label class="ckb" for="cb-638-6"> 
 
<input type="checkbox" name="cb-638" id="cb-638-6" value="3229" /> 
 

 
<i></i>Destination Management Company 
 
</label> 
 
<label class="ckb" for="cb-638-7"> 
 
<input type="checkbox" name="cb-638" id="cb-638-7" value="3230" /> 
 

 
<i></i>Destination Marketing Organization 
 
</label> 
 
<label class="ckb" for="cb-638-8"> 
 
<input type="checkbox" name="cb-638" id="cb-638-8" value="3231" /> 
 

 
<i></i>Event Service Provider 
 
</label> 
 
<label class="ckb" for="cb-638-9"> 
 
<input type="checkbox" name="cb-638" id="cb-638-9" value="3232" /> 
 

 
<i></i>Technology Provider 
 
</label> 
 
<label class="ckb" for="cb-638-10"> 
 
<input type="checkbox" name="cb-638" id="cb-638-10" value="3233" /> 
 

 
<i></i>Transportation 
 
</label> 
 
<label class="ckb" for="cb-638-11"> 
 
<input type="checkbox" name="cb-638" id="cb-638-11" value="3234" /> 
 

 
<i></i>Tourism Board 
 
</label> 
 
<label class="ckb" for="cb-638-12"> 
 
<input type="checkbox" name="cb-638" id="cb-638-12" value="3235" /> 
 

 
<i></i>Venues for Meeting/Events (non-hotel) 
 
</label> 
 

 

 

 

 
</fieldset> 
 

 

 

 
     
 
\t </form> \t 
 
</body> 
 
</html>

CSS는 CSS 부 라인 (207)에서 시작한다. 그것의 스택 오버플로 솔루션에서 : https://stackoverflow.com/a/17541916/155005

+0

이것은 표의 데이터로, 간단히 두 개의 열 테이블에 배치하십시오. – SaidbakR

+0

레이블과 입력을 분리하고 둘 사이의 연결을 유지하려면'for' html 속성을 사용해보십시오. CSS'white-space : nowrap' 속성과 값과 함께. http://www.w3schools.com/tags/att_label_for.asp – ExcellentSP

답변

1

float 추가 : 왼쪽; 당신이 태그

@import url(http://fonts.googleapis.com/css?family=Montserrat); 
 

 
/*basic reset*/ 
 
* {margin: 0; padding: 0;} 
 

 
.html_S { 
 
\t height: 100%; 
 

 
} 
 
.toast { 
 
    opacity: 1 !important; 
 
} 
 
.body_S { 
 
    min-height: 100%; 
 
    margin: 0; 
 
    background-repeat: no-repeat; 
 
    background-attachment: fixed; 
 
\t font-family: montserrat, arial, verdana; 
 
\t background-color: transparent !important; 
 
} 
 

 
.reqSpan_S { 
 
    top: -15px; 
 
\t position:relative; 
 
} 
 

 
.reqFieldText_S { 
 
    color: red; 
 
    padding: 0; 
 
    margin: 0; 
 
} 
 

 
.reqFieldStar_S { 
 
    font-weight: bold; 
 
} 
 
.k-button { 
 
    color: red; 
 
} 
 

 
.buttonCentre_S { 
 
    text-align: center; 
 
} 
 

 
.outerDiv_S { 
 
    width: 85%; 
 
    margin: 50px auto; 
 
    text-align: center; 
 
} 
 
#surveyForm { 
 
\t top: -35px; 
 
\t position:relative; 
 
    width: 85%; 
 
\t margin: 50px auto; 
 
\t text-align: left; 
 
} 
 
#surveyForm fieldset { 
 
\t background: white; 
 
\t border: 0 none; 
 
\t border-radius: 3px; 
 
\t box-shadow: 0 0 15px 1px rgba(0, 0, 0, 0.4); 
 
\t padding: 20px 30px; 
 
\t 
 
\t box-sizing: border-box; 
 
\t width: 80%; 
 
\t margin: 0 10%; 
 
} 
 

 
/*inputs*/ 
 
#surveyForm input, #surveyForm textarea { 
 
\t padding: 15px; 
 
\t border: 1px solid #ccc; 
 
\t border-radius: 3px; 
 
\t margin-bottom: 10px; 
 
\t width: 100%; 
 
\t box-sizing: border-box; 
 
\t font-family: montserrat; 
 
\t color: #2C3E50; 
 
\t font-size: 13px; 
 
} 
 
/*buttons*/ 
 
#surveyForm .action-button { 
 
    text-align: center; 
 
\t width: 100px; 
 
\t background: #27AE60; 
 
\t font-weight: bold; 
 
\t color: white; 
 
\t border: 0 none; 
 
\t border-radius: 1px; 
 
\t cursor: pointer; 
 
\t padding: 10px 5px; 
 
\t margin: 10px 5px; 
 
} 
 
#surveyForm .action-button:hover, #surveyForm .action-button:focus { 
 
\t box-shadow: 0 0 0 2px white, 0 0 0 3px #27AE60; 
 
} 
 
#surveyForm .action-button-submit { 
 
\t width: 100px; 
 
\t background: #3498db; 
 
\t font-weight: bold; 
 
\t color: white; 
 
\t border: 0 none; 
 
\t border-radius: 1px; 
 
\t cursor: pointer; 
 
\t padding: 10px 5px; 
 
\t margin: 10px 5px; 
 
} 
 

 
/*For Toast not part of surveyForm...*/ 
 
.action-button-ok { 
 
\t width: 100px; 
 
\t background: rgba(255, 255, 255, 0.3); 
 
\t font-weight: bold; 
 
\t color: white; 
 
\t border: 0 none; 
 
\t border-radius: 1px; 
 
\t cursor: pointer; 
 
\t padding: 10px 5px; 
 
\t margin: 10px 5px; 
 
} 
 

 
#surveyForm .action-button-submit:hover, #surveyForm .action-button-submit:focus { 
 
\t box-shadow: 0 0 0 2px white, 0 0 0 3px #3498db; 
 
} 
 
/*headings*/ 
 
.fs-title { 
 
\t font-size: 15px; 
 
\t text-transform: uppercase; 
 
\t color: #2C3E50; 
 
\t margin-bottom: 10px; 
 
} 
 
.fs-subtitle { 
 
\t font-weight: normal; 
 
\t font-size: 13px; 
 
\t color: #666; 
 
\t margin-bottom: 20px; 
 
} 
 
/*progressbar*/ 
 
#progressbar { 
 
\t margin-bottom: 30px; 
 
\t overflow: hidden; 
 
\t /*CSS counters to number the steps*/ 
 
\t counter-reset: step; 
 
} 
 
#progressbar li { 
 
\t list-style-type: none; 
 
\t color: white; 
 
\t text-transform: uppercase; 
 
\t font-size: 9px; 
 

 
\t /* width should be 100 divided by the number of steps */ 
 
\t /* this is set in the code dynamically in javascript */ 
 
\t width: 6.25%; 
 

 
\t float: left; 
 
\t position: relative; 
 
} 
 
#progressbar li:before { 
 
\t content: counter(step); 
 
\t counter-increment: step; 
 
\t width: 20px; 
 
\t line-height: 20px; 
 
\t display: block; 
 
\t font-size: 10px; 
 
\t color: #333; 
 
\t background: white; 
 
\t border-radius: 3px; 
 
\t margin: 0 auto 5px auto; 
 
} 
 
/*progressbar connectors*/ 
 
#progressbar li:after { 
 
\t content: ''; 
 
\t width: 100%; 
 
\t height: 2px; 
 
\t background: white; 
 
\t position: absolute; 
 
\t left: -50%; 
 
\t top: 9px; 
 
\t z-index: -1; /*put it behind the numbers*/ 
 
} 
 
#progressbar li:first-child:after { 
 
\t /*connector not needed before the first step*/ 
 
\t content: none; 
 
} 
 
/*marking active/completed steps green*/ 
 
/*The number of the step and the connector before it = green*/ 
 
#progressbar li.active:before, #progressbar li.active:after{ 
 
\t background: #27AE60; 
 
\t color: white; 
 
} 
 

 
.k-dropdown { 
 
    width: 100%; 
 
} 
 
.k-state-selected.k-state-focused { 
 
    background-color: #27AE60; 
 
    border: 0; 
 
} 
 

 
#surveyForm hr { 
 
    border: 0; 
 
    height: 0; 
 
    border-top: 1px solid rgba(0, 0, 0, 0.1); 
 
    border-bottom: 1px solid rgba(255, 255, 255, 0.3); 
 
\t margin-bottom: 10px; 
 
} 
 

 

 
/* http://stackoverflow.com/a/17541916/1550052 */ 
 

 

 
.rad, 
 
.ckb{ 
 
    cursor: pointer; 
 
    user-select: none; 
 
    -webkit-user-select: none; 
 
    -webkit-touch-callout: none; 
 
    padding: 10px; 
 
    clear: left; 
 
    float: left; 
 
} 
 
.rad > input, 
 
.ckb > input{ /* HIDE ORG RADIO & CHECKBOX */ 
 
    visibility: hidden; 
 
    position: absolute; 
 
} 
 
/* RADIO & CHECKBOX STYLES */ 
 
.rad > i, 
 
.ckb > i{  /* DEFAULT <i> STYLE */ 
 
    display: inline-block; 
 
    vertical-align: middle; 
 
    width: 16px; 
 
    height: 16px; 
 
    border-radius: 50%; 
 
    transition: 0.2s; 
 
    box-shadow: inset 0 0 0 8px #fff; 
 
    border: 1px solid #d3d3d3; 
 
    background: #666; 
 
    margin-right: 4px; 
 
} 
 
/* CHECKBOX OVERWRITE STYLES */ 
 
.ckb > i { 
 
    width: 25px; 
 
    border-radius: 3px; 
 
} 
 
.rad:hover > i{ /* HOVER <i> STYLE */ 
 
    box-shadow: inset 0 0 0 3px #fff; 
 
    background: #666; 
 
} 
 
.rad > input:checked + i{ /* (RADIO CHECKED) <i> STYLE */ 
 
    box-shadow: inset 0 0 0 3px #fff; 
 
    background: #27AE60; 
 
} 
 
/* CHECKBOX */ 
 
.ckb > input + i:after{ 
 
    content: ""; 
 
    display: block; 
 
    height: 12px; 
 
    width: 12px; 
 
    margin: 2px; 
 
    border-radius: inherit; 
 
    transition: inherit; 
 
    background: #d3d3d3; 
 
} 
 
.ckb > input:checked + i:after{ /* (RADIO CHECKED) <i> STYLE */ 
 
    margin-left: 11px; 
 
    background: #27AE60; 
 
}
<body class='body_S'> \t 
 

 

 
\t <form id='surveyForm'> 
 
     
 

 
     
 
\t \t <!-- fieldsets --> 
 
\t \t <fieldset > 
 
<h2 class="fs-title"> 
 
\t Demographic Search Criteria for iBE Appointment Scheduler For Your Company Profile 
 
</h2> 
 
<h2 class="fs-subtitle"> 
 
\t The demographic data you select here will be used by planners to help search and identify exhibitors they want to request meetings with. The data you fill in will default on all your booth staff members' profiles, however they can 
 
edit the selections to customize it to what they offer if it differs from what you offer. 
 
</h2> 
 
<h2 class="fs-subtitle"> 
 
\t 1 
 
</h2> 
 
<label>Main Type of Business 
 
</label> 
 
<br /> 
 

 
<label class="ckb" for="cb-638-0"> 
 
<input type="checkbox" name="cb-638" id="cb-638-0" value="3223" /> 
 

 
<i></i>Accommodations 
 
</label> 
 
<label class="ckb" for="cb-638-1"> 
 
<input type="checkbox" name="cb-638" id="cb-638-1" value="3224" /> 
 

 
<i></i>Activities, Attractions & Tours 
 
</label> 
 
<label class="ckb" for="cb-638-2"> 
 
<input type="checkbox" name="cb-638" id="cb-638-2" value="3225" /> 
 

 
<i></i>Association 
 
</label> 
 
<label class="ckb" for="cb-638-3"> 
 
<input type="checkbox" name="cb-638" id="cb-638-3" value="3226" /> 
 

 
<i></i>Convention and Visitors Bureau 
 
</label> 
 
<label class="ckb" for="cb-638-4"> 
 
<input type="checkbox" name="cb-638" id="cb-638-4" value="3227" /> 
 

 
<i></i>Convention Centre 
 
</label> 
 
<label class="ckb" for="cb-638-5"> 
 
<input type="checkbox" name="cb-638" id="cb-638-5" value="3228" /> 
 

 
<i></i>Cruise Line 
 
</label> 
 
<label class="ckb" for="cb-638-6"> 
 
<input type="checkbox" name="cb-638" id="cb-638-6" value="3229" /> 
 

 
<i></i>Destination Management Company 
 
</label> 
 
<label class="ckb" for="cb-638-7"> 
 
<input type="checkbox" name="cb-638" id="cb-638-7" value="3230" /> 
 

 
<i></i>Destination Marketing Organization 
 
</label> 
 
<label class="ckb" for="cb-638-8"> 
 
<input type="checkbox" name="cb-638" id="cb-638-8" value="3231" /> 
 

 
<i></i>Event Service Provider 
 
</label> 
 
<label class="ckb" for="cb-638-9"> 
 
<input type="checkbox" name="cb-638" id="cb-638-9" value="3232" /> 
 

 
<i></i>Technology Provider 
 
</label> 
 
<label class="ckb" for="cb-638-10"> 
 
<input type="checkbox" name="cb-638" id="cb-638-10" value="3233" /> 
 

 
<i></i>Transportation 
 
</label> 
 
<label class="ckb" for="cb-638-11"> 
 
<input type="checkbox" name="cb-638" id="cb-638-11" value="3234" /> 
 

 
<i></i>Tourism Board 
 
</label> 
 
<label class="ckb" for="cb-638-12"> 
 
<input type="checkbox" name="cb-638" id="cb-638-12" value="3235" /> 
 

 
<i></i>Venues for Meeting/Events (non-hotel) 
 
</label> 
 

 

 

 

 
</fieldset> 
 

 

 

 
     
 
\t </form> \t 
 
</body> 
 
</html>

+0

나는 새로운 라인에 모든 것을 원하지 않는다. 지능형 랩을 원합니다. – etw3

+1

업데이트 된 답변을 확인하십시오. 이게 니가 원하는거야? – Mojtaba

+0

예. 감사. – etw3

1

당신이 특별히 label 요소 내에 줄 바꿈을 방지하려면 레이블에, 그것을위한 CSS가 : 허용 할 경우

label.chk, label.rad { 
    white-space:nowrap; 
} 


줄 바꿈이 있지만 컨트롤과 레이블 시작 부분 사이에 발생하지 않는 경우에는 다음과 같이 코드를 조정할 수 있습니다.

.nowrap { 
    white-space:nowrap; 
} 
<label class="ckb" for="cb-638-1"> 
<span class="nowrap"><input type="checkbox" name="cb-638" id="cb-638-1" value="3224" /> 
<i></i>Activities,</span> Attractions & Tours 
</label> 

(당신은 또한 추가 span을 고려하여 .chk > ....rad > ... 규칙을 수정해야합니다.)


당신이 라벨 단지 인 원주에 만족하는 경우, 단지 label을 블록 수준 요소 :

label { 
    display:block; 
}