禁止文本转帐 checkbox
我张贴了一套旗帜和颠簸,进入了一个世纪历史的问题转移问题 checkbox, 如果文本太长。
我的 HTML:
我的 CSS:
看我的 fiddle 这里:
http://jsfiddle.net/fmpeyton/7WmGr/
/
在不同的网站上搜索许多搜索后,我似乎似乎找到了合理的解决方案。 我开放了改变我的建议 markup/styles,, 但我想将代码保存为清洁和语义。
谢!
我的 HTML:
<div class="right">
<form id="updateProfile">
<fieldset class="checkboxes">
<p>4. What is your favorite type of vacation?</p>
<label><input name="vacation" type="checkbox" value="Ski Trips"/> Ski Trips</label>
<label><input name="vacation" type="checkbox" value="Beach Visits"/> Beach Visits</label>
<label><input name="vacation" type="checkbox" value="Cruises"/> Cruises</label>
<label><input name="vacation" type="checkbox" value="Historical and educational trips"/> Historical and educational trips</label>
<label><input name="vacation" type="checkbox" value="Yachting"/> Yachting</label>
<label><input name="vacation" type="checkbox" value="Road Trip"/> Road Trip</label>
<label><input name="vacation" type="checkbox" value="Spa Weekend"/> Spa Weekend</label>
<label><input name="vacation" type="checkbox" value="Bed and Breakfast"/> Bed and Breakfast</label>
<label><input name="vacation" type="checkbox" value="Stay home and relax"/> Stay home and relax</label>
<label><input name="vacation" type="checkbox" value="Gambling Trips"/> Gambling Trips</label>
<label><input name="vacation" type="checkbox" value="Volunteer"/> Volunteer</label>
</fieldset>
</form>
</div>
我的 CSS:
div.right{width:580px;}
form#updateProfile fieldset label{
display: block;
margin-bottom: 5px;
font-size: 16px;
float: left;
width: 33%;
}
看我的 fiddle 这里:
http://jsfiddle.net/fmpeyton/7WmGr/
/
在不同的网站上搜索许多搜索后,我似乎似乎找到了合理的解决方案。 我开放了改变我的建议 markup/styles,, 但我想将代码保存为清洁和语义。
谢!
没有找到相关结果
已邀请:
6 个回复
郭文康
赞同来自:
http://jsfiddle.net/7WmGr/5/
/
我给了
a
的 18px 和旗帜 a
来自-8px。
似乎有效 Chrome & IE9.
诸葛浮云
赞同来自:
HTML:
CSS:
詹大官人
赞同来自:
演示在这里:
http://jsbin.com/opoqon/1/edit
我通常如何做到这一点不同于我不转身
从
, 我做了一些
然后允许您促进铺设。
以下是此方法的示例:
http://jsbin.com/otezut/1/edit
但无论如何,它将起作用。
八刀丁二
赞同来自:
郭文康
赞同来自:
你拿起包裹的部分。
并且您与课程添加了差距。 我打电话给课 antiWrap. 然后你使用 css, 将左字段添加到它。
这里 myfiddle, 基于您的代码的使用。
http://jsfiddle.net/alexhram/7WmGr/3/
我认为这是你努力的? 让我知道。
裸奔
赞同来自:
- 35 水坑和菲利普如何建议。
A B. CSS 你只是安装
在
, 并防止文本包装 checkbox, 你可以使用
在
.
您可以使用
, 从文本中提供所需的空间 checkbox.