Wiki Home

Template : clear


Namespace: VFP

Documentation for Template : clear

Template : clear produces this output:

(None that you can see -- it clears CSS floats.)

Template : clear

Use {{clear}} to clear subsequent wiki content from floating elements above.

Usage and Example

Call this template in any topic like the examples below.
{{clear}}       // Clears both left and right floating elements
{{clear|both}}  // Clears both left and right floating elements
{{clear|left}}  // Clears left floating elements only
{{clear|right}} // Clears right floating elements only

Discussion

This is arcane, probably TMI for most folks, but web markup (HTML) often relies on floating elements for layout.
  • Left-floating elements are on the left and subsequent markup is wrapped adjacent to the right.
  • Right-floating elements are pushed to the very right and subsequent markup is wrapped adjacent to the left.
For example, infoboxes are elements that float to the right.

Use {{clear}} to say, in effect, put what follows under the floating elements above.

Example

[[Image:Hobbes.jpg|position=floatleft|size=48px|caption=Hobbes]]
====This is beside Hobbes====

position=floatleft

This is beside Hobbes


[[Image:Hobbes.jpg|position=floatleft|size=48px|caption=Hobbes]]
{{clear}}
====This is under Hobbes====

position=floatleft

This is under Hobbes

( Topic last updated: 2010.12.12 05:50:23 PM )