Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате
Форум программистов > Вёрстка веб-сайтов > Щель между блоков в ІЕ


Автор: lukeKPI 18.6.2011, 11:04
Код не работает (щели между дивами) только в недобраузєре.  smile 
Код

<!--[if !IE]> <html> <![endif]-->
<!--[if lte IE 9]> <html class="IE"> <![endif]--> 

<head>
<title>504</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>

<body>

<div id="wrapper">
    <div id="header">
    
    </div>
    
    <div id="left">
    </div>
                
    <div id="right">
    </div>
    
    <div id="content">
    
    </div>
    
    <div id="hFooter">
    </div>
</div>

<div id="footer">
</div>

</body>
</html>


Код

html, body{
    margin: 0;
    width: 100%;
    height: 100%;
}
#wrapper{
    min-height: 100%;
    background: red;
    position: relative;
    soutline: 1px solid black;
}
.IE #wrapper{
    height: 100%;    /*for IE it seems that ;) */
}
#header{
    background: blue;
    position: relative;
    height: 100px;
}
#left{
    background: green;
    float: left;
    width: 20%;
    height: 100px;
    sdisplay: inline;
}
#content{
    background: silver;
    width: auto;
    margin: 0 20%;
    height: 700px;
    spadding: 1%;
    word-wrap: break-word;
}
#right{
    background: navy;
    float: right;
    width: 20%;
    height: 900px;
    sdisplay: inline;
}
#hFooter{
    sbackground: white;
    height: 50px;
    clear: both;
}
#footer{
    background: orange;
    height: 50px;
    margin-top: -50px;
    position: relative;
}

Автор: mcTep 22.6.2011, 18:28
Код

#content {
    width: 60%;
    float:left;
}

Автор: lukeKPI 25.6.2011, 19:40
mcTep  smile , а можно узнать в чем была проблема, почему там щели?

Автор: mcTep 26.6.2011, 13:04
Не знаю. Наверное, трюк с display: inline; действует только для соприкасающихся плавающих блоков. А у вас центральный был в обычном потоке. 

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)