Float
From Frontal Wiki
Contents |
Purpose
This style affects the layout of visual elements relative to their siblings.
Value
One of "left", "right" or "none". The default value is "none".
float: left;
Remarks
For a complete discussion of the float style see Frontal's Layout Scheme and in particular Floating Elements.
Example
For a discussion of this example, see Combining Left Floating, Right Floating and Normal Elements.
<style><![CDATA[ div { width: 200px; border-width: 1px; border-color: gray; background-color: orange; margin: 1px; float: left; } .right { background-color: deepskyblue; float: right; } ]]></style> <div style="height: 10%;" /><div class="right" style="height: 10%;" /> <div style="height: 15%;" /><div class="right" style="height: 15%;" /> <div style="height: 20%;" /><div class="right" style="height: 20%;" /> <div style="height: 25%;" /><div class="right" style="height: 25%;" /> <div style="height: 10%;" /><div class="right" style="height: 10%;" /> <div style="height: 15%;" /><div class="right" style="height: 15%;" /> <div style="height: 20%;" /><div class="right" style="height: 20%;" /> <div style="height: 25%;" /><div class="right" style="height: 25%;" />
See Also
Can Be Applied To
This style can be applied to any visual element: