Template:Clear: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
Tels (talk | contribs)
fixup
Tels (talk | contribs)
better layout
 
(One intermediate revision by the same user not shown)
Line 4: Line 4:
Here is an example:
Here is an example:


Wiki code:
'''Wiki code:'''


   <nowiki>[[Image:bevel09.jpg|right]]</nowiki>
   <nowiki>[[Image:bevel09.jpg|right|120px]]</nowiki>
   Some more text.  
   Some more text.
   This text will also be left of the image.
   This text will also be left of the image.


Here is how it looks:
'''Here is how it looks:'''


[[Image:bevel09.jpg|right]]
----
Some more text.  
[[Image:bevel09.jpg|right|120px]]
Even more text.
Some more text.
This text will also be left of the image.


{{clear}}
{{clear}}
----
And here is how it looks with this template:
And here is how it looks with this template:


Wiki code:
'''Wiki code:'''


   <nowiki>[[Image:bevel09.jpg|right]]</nowiki>
   <nowiki>[[Image:bevel09.jpg|right|120px]]</nowiki>
   Some more text.  
   Some more text.  
   <nowiki>{{clear}}</nowiki>
   <nowiki>{{clear}}</nowiki>
   This text will be below the image.
   This text will be below the image.


[[Image:bevel09.jpg|right]]
'''And this looks like so:'''
 
----
[[Image:bevel09.jpg|right|120px]]
Some more text.  
Some more text.  
{{clear}}   
{{clear}}   
Even more text.
This text will be below the image.
 
----
</noinclude><includeonly><div style="clear: both"></div></includeonly>
</noinclude><includeonly><div style="clear: both"></div></includeonly>

Latest revision as of 16:52, 28 October 2007

This template inserts an empty paragraph break that also clears floating elements, so that the text after this paragraph will be below them. This is usefull for when you anchor images with |right or |left. Anything written below these images will appear left or right of the image until the full height of the image is used up. With {{clear}}, you can force the text to continue after the image.

Here is an example:

Wiki code:

 [[Image:bevel09.jpg|right|120px]]
 Some more text.
 This text will also be left of the image.

Here is how it looks:


Some more text. This text will also be left of the image.


And here is how it looks with this template:

Wiki code:

 [[Image:bevel09.jpg|right|120px]]
 Some more text. 
 {{clear}}
 This text will be below the image.

And this looks like so:


Some more text.

This text will be below the image.