相关疑难解决方法(0)

使用不好!在css属性中很重要

不太了解css和纯粹的Java/J2EE开发人员,但有些人如何在一些css 我无法解决的难题中受到打击

我是使用一种形式与一些Jquery的灯箱效果,其具有dividclass

<div id="contact-container"
     class="myclass"
     style="z-index: 1002; height: 386px; width: 450px; position: fixed; left: 406.5px; top: 15%; ">
Run Code Online (Sandbox Code Playgroud)

在我的css文件中,我看到了以下条目

#contact-container {
    font: 16px/22px 'Trebuchet MS', Verdana, Arial;
    text-align:left;
    width:450px;
}
Run Code Online (Sandbox Code Playgroud)

但是当这个窗体显示为jquery弹出窗口时,它会在Mozilla中正确显示,但是在Google Chrome和IE浏览器上,盒子不能像它的某些部分那样正常显示,而是作为滚动条休息.

当我通过firebug(第一次使用:)看到它时,它向我展示了类似的东西

<div id="contact-container"
     class="myclass" 
     style="position: fixed; z-index: 1002; height: 67px; width: 450px; left: 406.5px; top: 15%;">
Run Code Online (Sandbox Code Playgroud)

对于相同的设置,IE和Mozilla没有正确使用,所以经过大量的Goggling后我做了更改 css

#contact-container {
    font: 16px/22px 'Trebuchet MS', Verdana, Arial;
    text-align:left;
    width:450px;
    height:380px !important;
}
Run Code Online (Sandbox Code Playgroud)

我把高度固定了 height:380px !important;

虽然这解决了我的问题,但不知道CSS我不知道这是否是正确的方法,因为我搜索高度,但它没有在任何地方定义.

如果我采取了错误的方法,请建议

html css css3

18
推荐指数
4
解决办法
9839
查看次数

标签 统计

css ×1

css3 ×1

html ×1