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


Автор: MoLeX 21.12.2009, 08:14
Привет.
В IE не получается растянуть div на всю страницу 
Код

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru" lang="ru">
<head>
<title>ы</title>
<meta http-equiv="Content-Language" content="ru" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
#loading
{
   float: left;
   top: 0px;
   left: -4px;
   width: 100% !important;
   height: 100% !important;
   background-image: url("../images/fon.png") !important;
   position: fixed;
}

#desktop
{
   margin: 0px auto;
   top: 25%;
   width: 300px;
   height: 100px;
   background: #E8E8E8;
   border: 1px solid #191900;
   color: #000000;
   font-size: 12px;
   font-weight: normal;
   cursor: wait;
   text-align: center;
   position: relative;
   z-index: 100;
}
</style>
</head>

<body id="body">

<div id="loading">
   <div id="desktop">
      <br /><b>Загрузка. <br />Пожалуйста, подождите...</b><br /><br /><img src="/images/ajax-loader1.gif" alt="" /><br />
   </div>
</div>


Автор: brother79 21.12.2009, 09:46
Цитата(MoLeX @  21.12.2009,  08:14 Найти цитируемый пост)
 width: 100% !important;
   height: 100% !important;



А зачем ты пишешь !important ? Видимо ie как раз его и не понимает.

Автор: Itsys 21.12.2009, 09:49
Какой div, loading или desktop?

Автор: MoLeX 21.12.2009, 10:11
Itsys, loading, 

Автор: bars80080 21.12.2009, 10:32
забыл в начале ещё:

Код

html, body { height: 100%; }

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