HTML CSS Reference/CSS Attributes and Javascript Style Properties/page break after

Материал из Web эксперт
Версия от 08:19, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

"page-break-after" Example

    
<html>
<body>
<div style="page-break-after:"always"; 
            background-color:#ccccff; 
            width:400; 
            height:70">
     When printing, there will be a page-break after this object.
</div>
</body>
</html>



"page-break-after" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<blockquote>                    <body>                        |
|                |<button>                        <caption>                     |
|                |<center>                        currentStyle                  |
|                |<dd>                            <dir>                         |
|                |<div>                           <dl>                          |
|                |<dt>                            <fieldset>                    |
|                |<form>                          <hn>                          |
|                |<isindex>                       <li>                          |
|                |<listing>                       <marquee>                     |
|                |<menu>                          <ol>                          |
|                |<p>                             <pre>                         |
|                |runtimeStyle                    style                         |
|                |<table>                         <tbody>                       |
|                |<tfoot>                         <th>                          |
|                |<thead>                         <tr>                          |
|                |<ul>                            <xmp>                         |
+----------------+--------------------------------------------------------------+



"page-break-after" Possible Values

Possible Values
always         always inserted after/before the element.
auto           forced or avoided before/after/inside the element.
avoid          avoided before/after/inside the element.
""             A page break is not inserted.(empty string)



"page-break-after" Syntax and Note

Note:
Add a page break after the element. 
Page breaks are not permitted inside positioned objects.
Syntax:
    
element { page-break-after: value }
elementID.style.pageBreakAfter = "value"
document.all.elementID.style.pageBreakAfter = "value" // IE only