CSS和Internet Explorer
我很难使用Internet Explorer 问题一: 我使用了CSS和Internet Explorer,css,internet-explorer,Css,Internet Explorer,我很难使用Internet Explorer 问题一: 我使用了最小高度:100%,我不知道这在IE中不起作用。我如何在css中设置“最小高度” 问题二: 我用过 position: relative; z-index:50000;` 对于我的标题,现在它没有在需要的地方对齐 我已经安装了湿婆 该网站的链接是 HTML(带CMS标签) 最小高度在IE7及更高版本中有效,但在IE6中无效。由于IE6的使用很小,你应该考虑忽略它。 您有以下代码: <!--[if lt IE 8]&g
最小高度:100%
,我不知道这在IE中不起作用。我如何在css中设置“最小高度”
问题二:
我用过
position: relative;
z-index:50000;`
对于我的标题,现在它没有在需要的地方对齐
我已经安装了湿婆
该网站的链接是
HTML(带CMS标签)
最小高度在IE7及更高版本中有效,但在IE6中无效。由于IE6的使用很小,你应该考虑忽略它。 您有以下代码:
<!--[if lt IE 8]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
摆脱第一块,你只需要第二块。这就是IE7中包含两个html5shim副本的内容。这是一个野蛮的解决方案,可能已经过时,但IE确实尊重图像边界。创建一个1x1像素的透明GIF或PNG,将其以一定高度粘贴在您的空间中
这也会给你一个像素的垫片(如果你喜欢的话,可以称之为前导),所以一定要围绕这个调整你的CSS。你知道你缺少一个结束标记吗?我们在这里谈论的是什么版本的IE?IE的最小高度技巧:对于你的标题设置,z-索引不应该改变它的位置。在你改变它之前不是position:relative吗?@MystereMan谢谢:)@DA我有IE8,但我想我还需要为IE9编码。如果你能创建一个JSFIDLE来说明问题,或者显示它的功能和实际外观的屏幕截图,那么标题在真正的浏览中可以很好地加载。仍然不能解决我的问题白色应该在导航的末尾(紫色)@杰西·麦肯齐——仅仅通过截图就很难知道发生了什么。您提供的HTML没有帮助,因为我们没有图像。
html{
background: url('../img/Body_BG.png') repeat-x 0 0 scroll;
background-color:#0C0C0C;
height:100%;
width:100%;
}
body{
width:960px;
height:100%;
min-height: 100% !important;
margin: 0 auto;
font-family:Verdana, Geneva, sans-serif;
}
h1{
margin:25px 0 0 25px;
font-family: 'Quicksand', sans-serif;
font-size:30px;
}
header{
height: 219px;
width: 551px;
margin:0 auto;
}
header #logo{
background:url('../img/logo.png') no-repeat scroll 0 0 transparent;
width:551px;
height:219px;
position: relative;
z-index:50000;
}
nav{
background:url('../img/navBG.png') no-repeat;
float:right;
width:135px;
height:100%;
padding:30px 0 0 0;
}
nav ul{
list-style:none;
margin:15px 0 0 0;
}
nav li{
margin:10px 0 0 -30px;
text-align:left;
text-indent:5px;
}
nav li a{
text-decoration:none;
color:#ff9f30;
font-family: 'Quicksand', sans-serif;
}
#mainContent{
float:right;
background:url('../img/mainBG.png') no-repeat;
width:707px;
height:auto;
min-height:100%;
margin:-35px auto;
}
#mainContent h1{
font-family: 'Quicksand', sans-serif;
}
#mainContent a{
color:#ff9f30;
font-weight:bold;
text-decoration: none;
}
#bottomBanner{
background: url('../img/bottomBanner.png') no-repeat;
width:478px;
height: 47px;
margin: -47px 0 0 300px;
}
#mainContent p{
margin:0 30px 0 30px;
font-size: 13px;
text-align:justify;
}
#Video{
margin: 30px 0 0 150px;
}
#Video #Vid{
border: 5px solid #4e2b97;
}
.img{
border: 5px solid #ff9f30;
}
a {
outline: none;
}
a img {
border: 1px solid #BBB;
padding: 2px;
margin: 10px 20px 10px 0;
vertical-align: top;
}
a img.last {
margin-right: 0;
}
ul {
margin-bottom: 24px;
padding-left: 30px;
}
#img{
margin-left: 25px;
}
#map{
margin:0 0 0 115px;
}
/* Sponsor Gallery CSS */
#gallery{
width:707px;
min-height: 100% !important;
margin:0 0 0 30px;
}
#galleryMain{
margin:0 0 0 150px;
}
.galleryLogo{
float:left;
width:200px;
height:200px;
margin:0 8px 5px 0;
}
#galleryLogo img{
border:none;
}
#galleryLogo a{
border:none;
text-decoration: none;
}
/* End Sponsor Gallery CSS */
#contact-form{
width:350px;
margin:10px auto;
}
#contact-form label{
float:left;
width:175px;
}
#contact-form input{
width:175px;
}
<!--[if lt IE 8]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->