渲染字段集的填充是怎么回事.它在FF和Chrome中表现如预期,但在IE中失败.这是我正在谈论的代码:
<html>
<head>
</head>
<body>
<fieldset>
<legend>Hello world!</legend>
<div>Lorem ipsum</div>
</fieldset>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
这就是css
fieldset {
border: 1px solid black;
padding: 30px;
}
fieldset legend {
background-color: silver;
}
fieldset div {
border: 1px dotted silver;
}
Run Code Online (Sandbox Code Playgroud)
也可以在这里看到:http: //jsfiddle.net/nRAGM/6/
所以我的问题是:如何让上面的html在IE中按预期显示?
我目前正在使用Bootstrap 3.从bootstrap文档中,我发现fieldset可以启用和禁用表单字段.那么,如何通过无线电控制开启和关闭?
HTML无线电控件
<form>
<div class="form-inline">
<label for="inputPassword" class="col-sm-6 control-label content_label"
style="margin-right:20px"> Do you want to change password ? </label>
<div class="radio">
<label>
<input type="radio" name="optionsRadios" id="optionsRadios1"
value="option1" >
Yes
</label>
</div>
<div class="radio" style="margin-left:10px;">
<label>
<input type="radio" name="optionsRadios" id="optionsRadios2"
value="option2" checked>
No
</label>
</div>
</div>
</form>
Run Code Online (Sandbox Code Playgroud) 我有一个 ExtJs 字段集。
{
xtype : 'fieldset',
layout : 'hbox',
defaults : {
layout : 'hbox',
labelAlign : 'left',
border : false,
frame : false
},
items : [ {
xtype : 'label',
id : 'idDrop',
text : '',
width : 120,
height : 25,
style : {
//background : 'yellow',
color : 'black',
textAlign: 'center',
border: '1px solid black',
'font-weight':'bold'
}
}, {
xtype : 'label',
text : '',
id : 'idPickup',
width : 120,
height : 25,
style …Run Code Online (Sandbox Code Playgroud) 我有一个fieldset,其中有一些输入字段和一个复选框.我有一个问题,我希望在复选框旁边有一个图例.我在这个链接上看到它:
我工作围绕并尝试使用padding-bottom和margin-bottom,没有任何成功.
如果有人可以帮助我,我真的很感激.非常感谢.
我正在尝试找到一组复选框,但我需要在字段集中找到它们.html就像这样(它是一个gwt应用程序,因此产生了大量的东西:
<div id="UpdateUserView-RolesColumn">
<fieldset style="">
<legend>Primary Role</legend>
<select class="gwt-ListBox">
<option value="ROLE_GENERAL_USER">ROLE_GENERAL_USER</option>
<option value="ROLE_ADMIN">ROLE_ADMIN</option>
</select>
</fieldset>
<fieldset style="" class="createUser-otherRolesFieldset">
<legend>Other Roles / Permissions</legend>
<div style="overflow: auto; position: relative; zoom: 1; height: 250px;">
<div style="position: relative; zoom: 1;">
<div>
<span class="gwt-CheckBox">
<input type="checkbox" value="on" id="gwt-uid-760" tabindex="0" checked="">
<label for="gwt-uid-760">ROLE_BLAH1_USER</label>
</span>
<span class="gwt-CheckBox">
<input type="checkbox" value="on" id="gwt-uid-761" tabindex="0" checked="">
<label for="gwt-uid-761">ROLE_BLAH2_USER</label>
</span>
<span class="gwt-CheckBox">
<input type="checkbox" value="on" id="gwt-uid-762" tabindex="0" checked="">
<label for="gwt-uid-762">ROLE_BLAH3_USER</label>
</span>
<span class="gwt-CheckBox">
<input type="checkbox" value="on" id="gwt-uid-763" tabindex="0" checked="">
<label for="gwt-uid-763">ROLE_BLAH4_USER</label> …Run Code Online (Sandbox Code Playgroud) 我目前正在使用a fieldset并legend在一些输入中绘制一个框,其形式看起来像这样:
---------Caption--------- | | | inputs | | | | | -------------------------
我很好奇是否有办法将另一个标题(legend)放在盒子的底部,如下所示:
---------Caption1-------- | | | inputs | | | | | --------Caption2---------
只使用legend字段集底部的另一个标签不起作用....
我在尝试将我的一个字段集的内容居中时遇到问题。它有一个验证码图像、一个输入字段和一个提交按钮。我尝试过使用 margin: 0 auto; 但无济于事...
<fieldset class="fieldset_submit">
{if captcha}
{captcha}
<p>Please enter the text you see above</p>
<input type="text" name="captcha" value="" />
{/if}
<input type="submit" name="submit" value="Send" class="submit" />
</fieldset>
Run Code Online (Sandbox Code Playgroud)
CSS代码:
.fieldset_submit {
display: block;
width: 500px;
margin: 0 auto;
border: none;
text-align: center;
padding: 40px;
}
input, select {
display: block;
margin: 5px 0 20px 0;
width: 300px;
height: 25px;
font-size: 16px;
color: gray;
padding: 5px;
border: 2px solid #ccc;
}
select {height: 35px;}
label {display: block; margin-bottom: 10px;} …Run Code Online (Sandbox Code Playgroud) 是否有任何直接的机制将不同字段集中的单选按钮逻辑分组(即只允许一个选择)?
我正在开发一个表单,我想围绕一个div,如下所示:
这是我的代码
<div class="selectMov" >
<p>Tipo de Movimiento</p>
<input type="radio" class="optTiMov" value=1> Entrada<br>
<input type="radio" class="optTiMov" value=2> Salida<br>
</div>
Run Code Online (Sandbox Code Playgroud)
我不知道该怎么做,因为我对此有点新手.非常感谢任何帮助,非常感谢你.
抱歉,如果之前有人问过这个问题,我的朋友让我为他们的网站做这种字段集。
此链接中的屏幕截图

它看起来很正常,但我很好奇如何在“旨在保留”文本的左侧和右侧获得那条小垂直线。
帮助将不胜感激。
问候,
function toggle(source) {
checkboxes = document.getElementsByName("foo");
for(var i=0; i < checkboxes.length; i++) {
checkboxes[i].checked = source.checked;
}
}Run Code Online (Sandbox Code Playgroud)
<form id="one">
<fieldset>
<legend>Select Quarter / 2017</legend>
<input type="checkbox" name="foo" onClick="toggle(this)" />All<br/>
<input type="checkbox" name="foo" >Q1 2017<br>
<input type="checkbox" name="foo" >Q2 2017<br>
<input type="checkbox" name="foo" >Q3 2017<br>
<input type="checkbox" name="foo" >Q4 2017<br>
</fieldset>
</form>
<form id="two">
<fieldset>
<legend>Select Quarter / 2017</legend>
<input type="checkbox" name="foo" onClick="toggle(this)" />All<br/>
<input type="checkbox" name="foo" >Q1 2017<br>
<input type="checkbox" name="foo" >Q2 2017<br>
<input type="checkbox" name="foo" >Q3 2017<br>
<input …Run Code Online (Sandbox Code Playgroud)