Introduction
Float is an HTML, CSS, and WikiText attribute that can be used to have information in different column style layouts without using much space.
This is an example. See how one line of text is on each side?
Columns can have borders, backgrounds, box shadow, and be scrolling boxes. Here are some examples.
These columns have borders:
This is an example. See how one line of text is on each side?
Often text fits between columns.
The middle space can be made a column by using the center tags, and you can also add another div style tag to give the middle text a border, background, etc.
This is the coding for the columns with borders:
<div style="color:black;"> <span style="float:left;border:5px cyan double;">This is an example.</span> <span style="float:right;border:5px cyan double;">See how one line of text is on each side?</span> </div>
Float Right
Float right is exactly as it sounds, it's pushing to as right as possible.
Here's an example:Float Right
The code for float right is:
<span style="float:right;">Float Right</span>
Float Left
Floating left is the same as floating right, the only difference is that it's pushing to as left as possible.
<-- Here's an example.Float Left
The code for float left is:
<span style="float:left;">Float Left</span>
Inherit
Inherit is inherited from its parent element. For example, <div style="float:right;"><span>Inherit</span></div>, this inherits the float from the div to the span, so the span should be floating right, the same as its parent element.
Result:
None
This float removes the floats. It's the default float, if you didn't specify.