Clear

From Frontal Wiki

Jump to: navigation, search

Contents

Purpose

This style affects how normal and floating elements are positioned.


Value

The clear style accepts values "left", "right", "both" or "none". The default value is "none".

clear: left;


Remarks

This style is used with the float style. For a complete discussion see Frontal's Layout Scheme and in particular Clearing the Floating Groups.


Example

In this example, clear is used to separate to groups of left-floating 'div' elements.

<style><![CDATA[
    div
        {
            width: 200px;
            border-width: 1px;
            border-color: gray;
            background-color: orange;
            margin: 1px;
            float: left;
        }
]]></style>
<div style="height: 10%;" />
<div style="height: 15%;" />
<div style="height: 20%;" />
<div style="height: 25%;">A</div>
<div style="height: 10%; clear: left; background-color: darkorange;">B</div>
<div style="height: 15%; background-color: darkorange;" />
<div style="height: 20%; background-color: darkorange;" />
<div style="height: 25%; background-color: darkorange;" />


See Also


Can Be Applied To

This style can be applied to any visual element:

Personal tools
Get Adobe Flash player