This site is supported by donations to The OEIS Foundation.
Template:Clear
The {{clear}} (or{{-}}) OEIS Wiki formatting and function template "clears" both margins (as default); it is often used before a header to make sure that a header will be the full width of the page. You also have the options to use it to clear only either the left margin or the right margin.
Contents
Caveat
-
<br style="clear: left;" />
, or -
<br style="clear: right;" />
, or -
<br style="clear: both;" />
.
If you use obsolete presentational HTML as in <table align="right">
for a "floating right" effect you would also need <br clear="all" />
instead of CSS to clear it consistently. Maybe modify this template to support obsolete presentational HTML—ugly, but working with any browser and all mixtures of "floating" markup.
Usage
or
or
where you may choose among the following subset of CSS clear attribute[2] values
- both: no floating elements allowed on either the left or the right side (default);
- left: no floating elements allowed on the left side;
- right: no floating elements allowed on the right side.
Examples
[[Image:Euclidean_algorithm_running_time_X_Y_361×361.png|thumb|alt="A set of colored lines radiating outwards from the origin of an {{math|''x''{{dash|n}}''y''|&}} coordinate system. Each line corresponds to a set of number pairs requiring the same number of steps in the Euclidean algorithm."|Number of steps in the [[Euclidean algorithm]] for {{math|[[GCD]](''x'', ''y'')|&}}. Red points indicate relatively few steps (quick), whereas yellow, green and blue points indicate successively more steps (slow). The largest blue area follows the line {{math|''y'' {{=}} ''ϕ''{{sp|1}}''x''|&}}, where {{math|''[[Phi|ϕ]]''|&}} represents the [[Golden ratio]].]] {{-}}
gives (without {{-}} the Code section would be to the left of the image, instead of below)
Code
Code (without obsolete presentation HTML support)
This is the code currently in use.
{{#switch: {{lc: {{{1|both}}} }} | l | left = <br style="clear: left;" /> | r | right = <br style="clear: right;" /> | both = <br style="clear: both;" /> }}
Code (with obsolete presentation HTML support)
{{#switch: {{lc: {{{1|both}}} }} | l | left = <br style="clear: left;" clear="left" /> | r | right = <br style="clear: right;" clear="right" /> | both = <br style="clear: both;" clear="all" /> }}