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

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

"page-break-inside" Example

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



"page-break-inside" 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-inside" 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-inside" Syntax and Note

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