Показать сообщение отдельно
  #11 (permalink)  
Старый 13.10.2009, 11:19
Amberwood
 
Сообщений: n/a

Так?
<html>
<head>
<title>byLine</title>
<style type="text/css">html, body { width:100%; height:100%; padding:0;} p {line-height:1.8em; letter-spacing:0.1em; text-align:justify;} #content {position:absolute; padding:5px 300px 20px 200px; z-index:2;} body {margin:0; font-family:verdana, arial, sans-serif; font-size:76%; height:100%;} #pic { z-index:1;  overflow: hidden; visibility:hidden;}</style>
<script>

function clientWidth(){return document.compatMode=='CSS1Compat'&&!window.opera?document.documentElement.clientWidth:document.body.clientWidth;}
function clientHeight(){return document.compatMode=='CSS1Compat'&&!window.opera?document.documentElement.clientHeight:document.body.clientHeight;}
function init(){
var imgId= document.getElementById('imgId');
imgId.style.width = clientWidth();
imgId.style.height = clientHeight();
}
</script>
</head>

<body onLoad="init();">
<div id="content">
  <h1>ALICE'S ADVENTURES IN WONDERLAND</h1>
  <h3>Lewis Carroll</h3>
  <h2>THE MILLENNIUM FULCRUM EDITION 3.0</h2>
  <h3>CHAPTER I</h3>
  <h4>Down the Rabbit-Hole</h4>
    <p>Alice was beginning to get very tired of sitting by her sister
    on the bank, and of having nothing to do:  once or twice she had
    peeped into the book her sister was reading, but it had no
    pictures or conversations in it, 'and what is the use of a book,'
    thought Alice 'without pictures or conversation?'</p>
  <p>So she was considering in her own mind (as well as she could,
    for the hot day made her feel very sleepy and stupid), whether
    the pleasure of making a daisy-chain would be worth the trouble
    of getting up and picking the daisies, when suddenly a White
    Rabbit with pink eyes ran close by her.</p>
  <p>Alice was beginning to get very tired of sitting by her sister
    on the bank, and of having nothing to do:  once or twice she had
    peeped into the book her sister was reading, but it had no
    pictures or conversations in it, 'and what is the use of a book,'
    thought Alice 'without pictures or conversation?'</p>
  <p>So she was considering in her own mind (as well as she could,
    for the hot day made her feel very sleepy and stupid), whether
    the pleasure of making a daisy-chain would be worth the trouble
    of getting up and picking the daisies, when suddenly a White
    Rabbit with pink eyes ran close by her.</p>
  <p>Alice was beginning to get very tired of sitting by her sister
    on the bank, and of having nothing to do:  once or twice she had
    peeped into the book her sister was reading, but it had no
    pictures or conversations in it, 'and what is the use of a book,'
    thought Alice 'without pictures or conversation?'</p>
  <p>So she was considering in her own mind (as well as she could,
    for the hot day made her feel very sleepy and stupid), whether
    the pleasure of making a daisy-chain would be worth the trouble
    of getting up and picking the daisies, when suddenly a White
    Rabbit with pink eyes ran close by her.</p>
 </div>

<img src="_images/b2.png" id="imgId" class="fon">

</body>

Не работает. Фон растягивается по высоте окна. Ниже текст идёт уже на белом фоне. В IE ваще хрень какая-то... Или я неправильно понял Вас?!

А может быть можно как-нибудь повлиять на CSS или background скриптом, находящемся в body, а не в head? Ведь та часть скрипта, которая отвечает за растяжение картинки при расположении в body работает. Тогда бы проблема была решена!

Последний раз редактировалось Octane, 20.10.2009 в 21:40. Причина: используйте тег [html] для оформления HTML-кода
Ответить с цитированием