Marks, Orphans, and More Style Sheet Properties
(Page 1 of 4 )
If you're looking for a thorough resource on style sheet properties, you've come to the right place. This article, the seventh part of a series, covers marks, orphans, and more. It is excerpted from chapter four of
Dynamic HTML: The Definitive Reference, Third Edition, written by Danny Goodman (O'Reilly; ISBN: 0596527403). Copyright © 2006 O'Reilly Media, Inc. All rights reserved. Used with permission from the publisher. Available from booksellers or direct from O'Reilly Media.
Alphabetical Property Reference: Marks
marks
IE n/a NN n/a Moz n/a Saf n/a Op n/a CSS 2
Inherited: n/a
This is a page context property that sets whether the page should be rendered with crop or registration marks outside of the page content area. This property must be set within an @page rule. See “At-Rules,” earlier in this chapter for details on deploying this type of style rule.
CSS Syntax
marks: markType | none
Value
Available markType values are the following constant values: crop | cross. A crop mark shows where pages should be trimmed; a cross mark is used for alignment and registration.
Initial Value non e
Example @page {marks: crop}
Applies To Page context .
Object Model Reference
[window.]document.getElementById("elementID").style.marks
max-height, min-height
IE (see text) NN n/a Moz all Saf all Op all CSS 2
Inherited: No
These properties let you establish a maximum and/or minimum height for an element’s box. You can bracket the permissible height of an element regardless of the height caused by the natural flow of the content.
When you set the max-height property of an element that has content that may extend beyond that maximum, you should also set the overflow style property to hidden so that excess content is cropped. Failure to do so causes the overflowing content to bleed into the succeeding elements’ content. Any box enhancements (borders, background color, etc.) shrink or expand to meet the requirements of the content or (if there isn’t enough content to fill the box) minimum height.
max-width, min-width
Internet Explorer 6 supports only the min-height property, and is limited to td , th , and tr elements inside a table with its table-layout style property is set to fixed . This conflicts with the CSS2 specification, which explicitly excludes table-related elements from being influenced by these properties. IE 7, however, implements both properties correctly when running in CSS compatibility mode (i.e., with a modern DOCTYPE declaration). IE 5 for Macintosh supports neither property.
CSS Syntax
max-height: length | percentage | none
min-height: length | percentage | none
Value
See the discussion of length values at the beginning of the chapter. The value may also be a percentage that is calculated relative to the element’s container. A value of none removes all constraints, allowing the content to flow naturally.
Initial Value none (max-width); none (min-width).
Applies To See text.
Object Model Reference
[window.]document.getElementById("elementID").style.minHeight
[window.]document.getElementById("elementID").style.maxHeight
max-width, min-width
IE 7 NN n/a Moz all Saf all Op all CSS 2
Inherited: No
These properties let you establish a minimum and/or maximum width for an element. You can bracket the permissible width of an element regardless of the width caused by the natural flow of the content within a parent container. IE 7 must run in CSS compatibility mode to use these properties
CSS Syntax
max-width: length | percentage | none
min-width: length | percentage | none
Value
See the discussion of length values at the beginning of the chapter. The value may also be a percentage that is calculated relative to the element’s container. A value of none removes all constraints, allowing the content to flow naturally.
Initial Value none (max-width); none (min-width).
Applies To All elements.
Object Model Reference
[window.]document.getElementById("elementID").style.minWidth
[window.]document.getElementById("elementID").style.maxWidth
Next: Moz border radius >>
More DHTML Articles
More By O'Reilly Media
|
This article is excerpted from chapter four of Dynamic HTML: The Definitive Reference, Third Edition, written by Danny Goodman (O'Reilly; ISBN: 0596527403). Check it out today at your favorite bookstore. Buy this book now.
|
|