HTML页面打印错误

HTML页面打印错误,html,Html,我在这个页面的中间打印一个JavaScript日历,由于某些原因,当我运行这个代码时,地址块打印在日历打印的表上方。我需要在地址栏上方打印日历。提前谢谢你的帮助 <body> <div id="head"> <img style="float: right; border: 1px solid orange" src="photo.jpg" alt="" /> <img src="ccc.jpg" alt="Cha

我在这个页面的中间打印一个JavaScript日历,由于某些原因,当我运行这个代码时,地址块打印在日历打印的表上方。我需要在地址栏上方打印日历。提前谢谢你的帮助

<body>
    <div id="head">
        <img style="float: right; border: 1px solid orange" src="photo.jpg" alt="" />
        <img src="ccc.jpg" alt="Chamberlain Civic Center" />
    </div>

   <div id="links">
       <table><tr>
           <td><a href="#">Home</a></td><td><a href="#">Tickets</a></td>
           <td><a href="#">Events</a></td><td><a href="#">Directions</a></td>
           <td><a href="#">Hours</a></td><td><a href="#">Calendar</a></td>
           <td><a href="#">Tour</a></td><td><a href="#">Contact Us</a></td>
       </tr></table>
   </div>

   <div id="main">
       <h1>Yearly Calendar</h1>
       <table id='yearly_table'>
       <tr>
           <th id='yearly_title' colspan='4'></th>
       </tr>
       <script type="text/javascript">
           yearly();
       </script>
   </div>

   <address>
   The Chamberlain Civic Center &nbsp;&#183;&nbsp;
   2011 Canyon Drive &nbsp;&#183;&nbsp;
   Chamberlain, SD 57325 &nbsp;&#183;&nbsp;
   (800) 555-8741
   </address>

</body>

年历
每年();
张伯伦市民中心·;
2011年峡谷大道183号;
张伯伦,SD 57325和183;
(800) 555-8741

只需将地址添加到div标记。像这样

<html>
<head>
</head>
<body>
  <div id="head">
      <img style="float: right; border: 1px solid orange" src="photo.jpg" alt="" />
      <img src="ccc.jpg" alt="Chamberlain Civic Center" />
  </div>

  <div id="links">
  <table>
    <tr>
     <td><a href="#">Home</a></td><td><a href="#">Tickets</a></td>
     <td><a href="#">Events</a></td><td><a href="#">Directions</a></td>
     <td><a href="#">Hours</a></td><td><a href="#">Calendar</a></td>
     <td><a href="#">Tour</a></td><td><a href="#">Contact Us</a></td>
    </tr>
  </table>
  </div>

  <div id="main">
   <h1>Yearly Calendar</h1>
        <table id='yearly_table'><tr>
        <th id='yearly_title' colspan='4'>

    </th>
    </tr>
   <script type="text/javascript">
  yearly();
  </script>
   </div>

  <div>
  <address>
  The Chamberlain Civic Center &nbsp;&#183;&nbsp;
  2011 Canyon Drive &nbsp;&#183;&nbsp;
  Chamberlain, SD 57325 &nbsp;&#183;&nbsp;
  (800) 555-8741
  </address>
  </div>

</body>
</html>

年历
每年();
张伯伦市民中心·;
2011年峡谷大道183号;
张伯伦,SD 57325和183;
(800) 555-8741

只需将地址添加到div标记。像这样

<html>
<head>
</head>
<body>
  <div id="head">
      <img style="float: right; border: 1px solid orange" src="photo.jpg" alt="" />
      <img src="ccc.jpg" alt="Chamberlain Civic Center" />
  </div>

  <div id="links">
  <table>
    <tr>
     <td><a href="#">Home</a></td><td><a href="#">Tickets</a></td>
     <td><a href="#">Events</a></td><td><a href="#">Directions</a></td>
     <td><a href="#">Hours</a></td><td><a href="#">Calendar</a></td>
     <td><a href="#">Tour</a></td><td><a href="#">Contact Us</a></td>
    </tr>
  </table>
  </div>

  <div id="main">
   <h1>Yearly Calendar</h1>
        <table id='yearly_table'><tr>
        <th id='yearly_title' colspan='4'>

    </th>
    </tr>
   <script type="text/javascript">
  yearly();
  </script>
   </div>

  <div>
  <address>
  The Chamberlain Civic Center &nbsp;&#183;&nbsp;
  2011 Canyon Drive &nbsp;&#183;&nbsp;
  Chamberlain, SD 57325 &nbsp;&#183;&nbsp;
  (800) 555-8741
  </address>
  </div>

</body>
</html>

年历
每年();
张伯伦市民中心·;
2011年峡谷大道183号;
张伯伦,SD 57325和183;
(800) 555-8741

看起来你没有关闭表标记,把它放在
行下面:
看起来你没有关闭表标记,把它放在
行下面:

把地址标记放在div标记里面,看看结果是什么?我可能做错了,但若我把上面的地址和下面的地址,它似乎并没有移动。该项目的这一部分甚至是在书中为我们编写的,不确定为什么它不能按预期工作。看起来您没有关闭表标记,请将其放在
行下方:
就是它完成的。我真的非常感谢你的帮助,先生。希望我能报答你的好意,不客气。我将添加它作为一个答案,这样您就可以接受:)将地址标记放在div标记中,看看结果是什么?我可能做错了,但如果我将地址放在上面和下面,它似乎不会移动。该项目的这一部分甚至是在书中为我们编写的,不确定为什么它不能按预期工作。看起来您没有关闭表标记,请将其放在
行下方:
就是它完成的。我真的非常感谢你的帮助,先生。希望我能报答你的好意,不客气。我将把它作为一个答案添加进来,这样你就可以接受:)并且关闭表格非常有效。多亏了你们两位,把桌子合上真是妙不可言。感谢你们两位。不客气,请随时留意不完整的标签:)如果回答了您的问题,请单击此答案左侧的“V”接受它。不客气,请随时留意不完整的标签:)如果回答了您的问题,请单击此答案左侧的“V”接受它。