InternetUnicodeHTML Draft for Information Only
ContentCSS Container
CSS ContainerCSS Container is a general term used to describe the styling container of CSS model. Characteristic of CSS ContainerA CSS Container has two typical characteristics, flow and behaviour. Flow of CSS ContainerAccording to the flow of CSS Container, CSS Containers used in CSS can be divided into discrete flowing container and inline flowing container. An discrete flowing container is a flow independent container of which the placement of container is arranged mainly according to the CSS rendering property of the container with reference to a higher hierarchy CSS container. For example, the discrete normal flow. An inline flowing container is a flow dependent container of which the placement of container is arranged according to the CSS rendering property of the container with reference to the CSS inline typesetting model. For example, the inline normal flow. Level of CSS ContainerThere are two concerns in the level of CSS container. According to the containing ability of the corresponding HTML Container, an inline level HTML container can only contain inline level HTML container, while an block level container can contain both inline and block level HTML containers. Therefore the level of CSS container can be naturally divided into inline, inline-block, or block level container according to the HTML tag element. And this is the structural limitation due to the HTML document. In fact, the level of CSS container only affects the available predefined presentation properties of the CSS container, that is the behaviour. In general, a CSS inline level container is used to specify a CSS container that is used an inline typesetting purpose container with specific CSS inline level properties, while a CSS block level container is used to specify a CSS container that is used as a more general purpose container with specific CSS block level properties. As both inline flowing and discrete flowing are built-in features for all types of CSS containers, that is, an CSS inline level container can also be used to contain both CSS inline level and CSS block level containers providing that the HTML requirements are fulfilled. Types of Basic CSS ContainersThe types of basic CSS containers can be grouped according to the flow of CSS container. Inline Flowing ContainerThe inline concept used in CSS2 has two meanings but shares the same sense, that is a discrete flowing container can never be an inline level container. In other words, an inline flowing inline level container, called 'inline' container, is an inline flowing container with inline level behaviour. An inline flowing HTML block level container, called 'inline-block' container, is an inline flowing container with block level behaviour. Discrete Flowing ContainerA discrete flowing block level container, called 'block' block, is a discrete flowing container with block level behaviour. However, there is no discrete flowing inline level containers because a block level container is already a general purpose container and a container with specific inline feature will already be considered as an inline flowing container. Types of Basic CSS Containers
inline levelblock level
inline flowinlineinline-block
discrete flown/ablock
Display PropertyThe display property of CSS Container is originally only used to specify some typical predefined forms and patterns that matching with HTML tag. But, the CSS display property can also be used to alter the display property of a HTML tag element. However, the CSS display property is only designed to modify how the CSS container is displayed, and is not used to modify the property of a HTML tag. Therefore, an inline level HTML tag with CSS block display property will be displayed as a CSS block level container, but the inline level HTML tag is still not allowed to contain any block level HTML tag elements. In CSS level 2 specification, a single keyword value is used to specify the characteristics of a CSS container. But in CSS level 3 specification, these characteristics are refered as outer display type and inner display type explicitly and two keyword values are used to specify the characteristics of a CSS container. In general, CSS display property is used to specify the form or pattern of how a CSS container is presented. CSS FormCSS display form is mainly used to specify how to present the specified container. Some typical CSS forms are inline, inline-block, block, none, list-item, table-cell, table-caption. CSS PatternCSS display pattern is mainly used to specify how to present the child containers of the specified container. Some typical CSS patterns are table, inline-table, table-column-group, table-header-group, table-footer-group, table-column, table-row. CSS Containers of HTML tagsAn example of HTML tags with default display property.
HTML Document Input:
HTML Web Page Embedded Output: Anonymous ContainerBesides these named containers specified by display property, two special types of containers, called anonymous block container and anonymous inline container, are generated by the visual formatting algorithm. Both anonymous block and anonymous inline containers do not have a specific CSS Container name that can be specified by CSS selectors. Anonymous Inline ContainerAnonymous inline container is used to hold inline flowing containers Anonymous Block ContainerAnonymous block container is used to hold discrete flowing containers Common CSS Containers of HTML TagsThe types of HTML tags can be divided into document construction and document presentation according to function. And for presentation, HTML tags can be further divided into block level and inline level. In general, the CSS display property is originally used to match with the HTML tags. However, most HTML tags can be grouped into three common CSS containers, inline container, inline-block container, and block container. And therefore the flow and level characteristics of CSS containers can also be used to classify HTML tags also. CSS 'block' ContainerA CSS container with 'block' display property is a CSS discret flowing block level type container. CSS 'inline' ContainerA CSS container with 'inline' display property is a CSS inline flowing inline level type container. CSS 'inline-block' ContainerA CSS container with 'inline-block' display property is a CSS inline flowing block level type container. CSS Containers of HTML TagsThe CSS display property is usually specified according to the name of HTML tag.
HTML tagDefault CSS Display PropertyDefault CSS FlowDefault CSS LevelHTML tag Level
headnonen/an/an/a
html, address, blockquote, body, dd, div, dl, dt, fieldset, form, h1, h2, h3, h4, h5, h6,
ol, p, ul, center, hr, pre blockdiscreteblockblock
lilist-itemdiscreteblockblock
tabletablediscreteblockblock
trtable-rowdiscreteblockblock
theadtable-header-groupdiscreteblockblock
tbodytable-row-groupdiscreteblockblock
tfoottable-footer-groupdiscreteblockblock
coltable-columnn/an/an/a
colgrouptable-column-groupn/an/an/a
td, thtable-celldiscreteblockblock
captiontable-captiondiscreteblockblock
button, textarea, input, selectinline-blockinlineblockblock
b, strong, i, cite, em, var, tt, code, kbd, samp, img, span, big, small, sub, sup, s, strike, del, u, ins, q inlineinlineinlineinline
brinlineinlineinlineinline
CSS Container PositioningThe ways to place a CSS Container in a parent container are flowing, floating, and positioning. These positioning methods are designed to present CSS containers in a CSS document. FlowingThe flowing method, also called static flowing, is the basic CSS Container positioning method used in typesetting. The flowing method is triggered by specifying the CSS float property to none, and the CSS position property to static. In default static flow, a discrete flowing container, i.e. block, flows vertically as a new paragraph in the parent container, while an inline flowing container, i.e. inline, inline-block, flows horizontally along a inline box of the parent container. FloatingThe floating method is a general CSS Container positioning method used along with flowing. The floating method is triggered by specifying the CSS float property not to none, and the CSS position property to static. In floating, a floating container is a discrete flowing container that floats according to the specified value of the float property. PositioningThe positioning method is a flexible CSS Container positioning method with reference to an anchor point. The positioning method is triggered by specifying the CSS position property to fixed, absolute, and relative. With CSS position fixed property, the reference anchor point is with respect to the viewport. With CSS position absolute property, the reference anchor point is with respect to the positioned non-static parent container including margin. With CSS position relative property, the reference anchor point is with respect to the original exactly defined normal static position in form of offset position. Examples of CSS PositioningExample
HTML Document Input:
HTML Web Page Embedded Output: The Basic Types of CSS Container PresentationApart from the predefined CSS forms or patterns, the CSS display, float and position properties are used to arrange the presentation of CSS container in the CSS document. The Display, Float, and Position Properties of CSS Container Positioning
CSS DisplayCSS Float PropertyCSS Position PropertyCSS Top, Bottom, Left, Right PropertiesPositioning
'inline' or "inline-block''none'staticanyInline Flowing
'inline' or "inline-block''none'relative0Inline Flowing
'block''none'staticanyNormal Discrete Flowing
'block''none'relative0Normal Discrete Flowing
anynot 'none'staticanyFloating
anynot 'none'relative0Floating
anyanyfixed, absolute, relativeposition/offset valuesPositioning
anyanyfixedposition valuesFixed positioning with respect to viewPort.
anyanyabsoluteposition valuesAbsolute positioning with respect to a upper non-static parent container.
any'none'relativenon zero offser valuesRelative positioning with respect to its original static flowing position additionally.
anynot 'none'relativenon zero offset valuesRelative positioning with respect to its original static floting position additionally.
©sideway ID: 190400018 Last Updated: 4/18/2019 Revision: 0 Ref: References
Latest Updated Links
|
Home 5 Business Management HBR 3 Information Recreation Hobbies 8 Culture Chinese 1097 English 339 Travel 9 Reference 79 Computer Hardware 251 Software Application 213 Digitization 32 Latex 52 Manim 205 KB 1 Numeric 19 Programming Web 289 Unicode 504 HTML 66 CSS 65 SVG 46 ASP.NET 270 OS 431 DeskTop 7 Python 72 Knowledge Mathematics Formulas 8 Set 1 Logic 1 Algebra 84 Number Theory 206 Trigonometry 31 Geometry 34 Calculus 67 Engineering Tables 8 Mechanical Rigid Bodies Statics 92 Dynamics 37 Fluid 5 Control Acoustics 19 Natural Sciences Matter 1 Electric 27 Biology 1 |
Copyright © 2000-2024 Sideway . All rights reserved Disclaimers last modified on 06 September 2019