2016-09-09 6 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

これは表形式のデータであり、単純に2つの列のテーブルに配置します。 – SaidbakR

+0

'for' html属性を使って、ラベルと入力を区切り、それらの間の接続を維持できるようにしてください。 CSSの 'white-space:nowrap'プロパティと値に加えて。 http://www.w3schools.com/tags/att_label_for.asp – ExcellentSP

答えて

1

フロートを追加:左;あなたがタグ

@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; 
} 
関連する問題