Css 针对同一div具有不同设计的浏览器
我有几个不同的问题 我有一个div,还有几个其他div和一些控件。我最大的问题是,它在Chrome中的外观与在其他浏览器中的不一样。目前的情况如下: 最大的问题是Chrome,其中“宽度:”文本右侧的文本框向下移动到下一行。框的代码可以在或中看到,如下所示:Css 针对同一div具有不同设计的浏览器,css,html,styles,Css,Html,Styles,我有几个不同的问题 我有一个div,还有几个其他div和一些控件。我最大的问题是,它在Chrome中的外观与在其他浏览器中的不一样。目前的情况如下: 最大的问题是Chrome,其中“宽度:”文本右侧的文本框向下移动到下一行。框的代码可以在或中看到,如下所示: <div id="div_properties" class="redBorder left" style="clear: left; display: <div class="right">
<div id="div_properties" class="redBorder left" style="clear: left; display:
<div class="right">
<a href="#" id="closePropertiesWindow">
<img src="close.png" title="Close window"></a>
</div>
<div class="centered noMargin whiteBackground">
<h3 class="noMargin">Properties</h3>
</div>
<hr class="noMargin noPadding">
<div id="div_properties_content" style="display: block;">
<div class="noMargin propertiesControl" prop="text" style="width:100%;">
text:
<input type="text" id="propertytextTextBox" class="right"></input>
</div>
<div class="noMargin propertiesControl" prop="width" style="width:100%;">
width:
<input type="number" id="propertywidthNumber" class="right"></input>
</div>
<div class="noMargin propertiesControl" prop="italic" style="width:100%;">
italic:
<input type="checkbox" id="propertyitalicCheckBox" class="right" checked="checked">
</div>
<div class="noMargin propertiesControl" prop="bold" style="width:100%;">
bold:
<input type="checkbox" id="propertyboldCheckBox" class="right">
</div>
<br>
<input type="button" id="savePropertiesButton" value="Save" class="right">
</div>
</div>
#div_properties {
margin-top: 5px;
background-color: #F0F0F0;
width: 300px;
float: left;
min-height: 75px;
}
.redBorder {
border: 1px solid red;
}
.noMargin {
margin: 0 0 0 0;
}
.left {
float: left;
}
.right {
float: right;
}
(这些都是此范围内的相关类,在项目上定义的其他类没有样式,但正在JavaScript中使用。)
另外,我遇到的另一个问题是IE中近景图像周围的“框边”。这不是一个大问题,但如果有人知道是什么导致了它,那就太棒了 是浮动导致了问题。你需要清除它们
.propertiesControl {
clear:both;
}
我很惊讶IE呈现得很好..IE关闭按钮问题可以通过添加
边框来解决:0代码>到您的#img1
css样式井,这是解决的问题之一。谢谢:-)您正在使用reset.css吗?你用的是哪种doctype?@LarsJensen-ohh是floats,你可以读到:)工作得很好。你能解释一下为什么会这样吗?我很想知道,以备将来参考。浮动
不会像非浮动元素那样影响其容器,因此父元素不会被其浮动子元素打开。