Форум Flasher.ru

Форум Flasher.ru (http://www.flasher.ru/forum/index.php)
-   HTML/DHTML/CSS/JS/VB (http://www.flasher.ru/forum/forumdisplay.php?f=66)
-   -   Позиционирование <div> с помощью css (http://www.flasher.ru/forum/showthread.php?t=82332)

KUZEN 10.07.2006 22:57

Позиционирование <div> с помощью css
 
Почему то самый последний див отказывается позиционироваться в самом низу страницы и причём только в IE, а в Firefox и Opere всё пучком

Код:

<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<title>Untitled Document</title>
</head>
<style type="text/css">
html, body{
margin:0; padding:0; rightmargin:0; border:0;
width:100%;
height:100%;
}
#header{
background-color:#006699;
color:#FFFFFF;
height:70px;
position:fixed; top:0px; left:0px; right:0px;
z-index:3;
}
#content{
position:absolute; top:70px; bottom:40px; left:0px; right:0px;
z-index:1;
}
#footer{
background-color:#006699;
color:#FFFFFF;
height:40px;
position:fixed; bottom:0px; left:0px; right:0px;
z-index:2;
}
</style>
<body>
<div id="header">
header
</div>
<div id="content" align="justify">
content
</div>
<div id="footer">
foter
</div>
</body>
</html>


deathstorm 11.07.2006 01:37

position:fixed; - msie 6.0 is not supported

KUZEN 11.07.2006 04:07

я уж разобрался что fixed не фурыкает в ИЕ, подобное наверняка можно решить с помощью жабаскрипта, вот только как ?!

Skubent 11.07.2006 12:02

Как-то вот так:
Код:

<style type="text/css">
html, body
{
margin:0; padding:0; rightmargin:0; border:0;
width:100%;
height:100%;
}

#header
{
background-color:#006699;
color:#FFFFFF;
height:70px;
z-index:3;
}

#content
{
z-index:1;
}

#footer_must_stay { position: relative; height: 40px; }

#footer
{
background-color:#006699;
color:#FFFFFF;
width:100%;
height: 40px;
margin-top: -40px;
position:relative; bottom:0px; left:0px; right:0px;
z-index:2;
}
</style>
<body>
<div id="header">
header
</div>
<div id="content" align="justify">
content_start<br />
content<br /> Повторить сколько надо.
content_end<br />
</div>

<div id="footer_must_stay"></div>

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


KUZEN 11.07.2006 14:10

Не ты меня не прально понял, нужна жёсткая привязка внизу страницы в независимости от контента

aksios 11.07.2006 15:04

Цитата:

Сообщение от KUZEN
Не ты меня не прально понял, нужна жёсткая привязка внизу страницы в независимости от контента

Нет у меня 6ки но наверно как то так.

motor4ik 11.07.2006 15:10

у меня работает в ие , покатит ему )))

KUZEN 11.07.2006 16:40

Я уж сам нашёл, но всё равно спасибо, вот тут собственно http://tagsoup.com/-dev/null-/css/fixed/


Часовой пояс GMT +4, время: 20:35.

Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.