Bootstrap有一种table {border-collapse: collapse; border-spacing:0;}
风格.我想覆盖它,所以我创建了一个类并将其应用于有问题的表:
table.FormGroupContainer
{
border-collapse: separate;
border-spacing: 2px;
}
Run Code Online (Sandbox Code Playgroud)
但仍然边界仍然崩溃.Chrome元素检查器显示Bootstrap CSS已被覆盖,但只允许检查器中的样式禁用边框间距.我在IE 11和Firefox 31.0中观察到了这一点.内联样式也会显示为覆盖(如Chrome检查器中所示),但在禁用Bootstrap样式之前无效.
CSS加载顺序似乎没有任何区别. 是什么赋予了?是不是班级更高的特异性?
css google-chrome css-specificity twitter-bootstrap border-spacing
我不明白为什么caseButtonBarRow2 div宽度呈现为297.778px.它应该是300px,对吗?我想这是我的border: 1px #FF2F2A solid;
.这似乎是以1.111px的大小呈现....但为什么呢?这是容器中的几个div级别,固定宽度为310px(左/右填充为5px).顶级div是唯一具有固定宽度的div,所以我猜 caseButtonBarRow2应该延伸到300px,对吗?
HTML:
<div id="caseButtonBarRow2" class="buttonBarRow">
<div style="position: relative;">
<a id="MainContent_Case7CheckBox_ToggleButton" href="" title="UNSELECTED" style="position: absolute; left: 0px; top: 0px; width: 40px; height: 40px; font-size: 40px; background-image: url(https://jimasta-laptop/ExaminerGradeSheet/images/ExaminerButton7_unchecked.png); background-repeat: no-repeat;"></a>
</div>
<input data-act-togglebuttonextender="imageWidth:40,imageHeight:40,uncheckedImageUrl:'images/ExaminerButton7_unchecked.png',checkedImageUrl:'images/ExaminerButton_checked.png',uncheckedImageAlternateText:'UNSELECTED',checkedImageAlternateText:'Case 7',id:'MainContent_ctl230'" id="MainContent_Case7CheckBox" type="checkbox" name="ctl00$MainContent$Case7CheckBox" style="visibility: hidden;">
<div style="position: relative;"><a id="MainContent_Case8CheckBox_ToggleButton" href="" title="UNSELECTED" style="position: absolute; left: 0px; top: 0px; width: 40px; height: 40px; font-size: 40px; background-image: url(https://jimasta-laptop/ExaminerGradeSheet/images/ExaminerButton8_unchecked.png); background-repeat: no-repeat;">
</a>
</div>
<input data-act-togglebuttonextender="imageWidth:40,imageHeight:40,uncheckedImageUrl:'images/ExaminerButton8_unchecked.png',checkedImageUrl:'images/ExaminerButton_checked.png',uncheckedImageAlternateText:'UNSELECTED',checkedImageAlternateText:'Case 8',id:'MainContent_ctl232'" id="MainContent_Case8CheckBox" type="checkbox" name="ctl00$MainContent$Case8CheckBox" style="visibility: hidden;">
<div …
Run Code Online (Sandbox Code Playgroud)