0

相対および絶対位置とパーセンテージを含むページを使用しています。HTML と Body は 100% に設定され、コンテナの div は相対で、内部の div は絶対です。コンテナ div に設定した繰り返し背景画像がページいっぱいに表示されません - 途中で止まってしまうのはなぜですか? 前もって感謝します!

これが私が持っているものです:

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

.container {
   width:1000px;
   height:100%;
   background-image:url('background.jpg');
   position: relative;
   margin-left:auto;
   margin-right:auto;
  }
.header {
   width:1000px;
   height:300px;
   background-color:#ffffff;
   position: absolute;
   top:0px;
   left:0px;
  }


.content {
   width: 680px;
   position:absolute;
   top: 350px;
   left: 310px;
  }

.post {
   width: 630px;
   padding: 20px;
   padding-top: 50px;

  }

.title {
   width: 650px;
   height: 20px;
   padding: 10px;
   position: absolute; left: -10px; top: 10px;
  }




</style>

<body>
<div class="container">

 <div class="header">
 Placeholder for header image.
 <p><a href="index.html">Home</a></p>
 </div>


 <div class="content">
  <div class="post">
   <div class="title">Welcome</div>

    <img src="PLACEHOLDER.JPG" alt="Proposal Photo" width="630" />
  </div>
 </div>
</div>
4

1 に答える 1