Difference between revisions of "Template:floatRight/doc"

From WikiCorporates
Jump to navigation Jump to search
(→‎Three Image Example)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
−
Irritatingly, MediaWiki's implementation of <tt><nowiki>[[File:xxx]]</nowiki></tt> for images does not allow the option of a span, but only a div. This means that floating two images side-by-side is not possible, as the div forces them onto separate lines.
+
{{Breadcrumbs|[[Template:floatRight]]|Doc}}
 +
Irritatingly, MediaWiki's implementation of <tt><nowiki>[[File:...|right/left]]</nowiki></tt> for images does not allow the option of a span, but only a div. This means that floating two or more images side-by-side is not possible, as the div forces them onto separate lines.
  
 
This template takes two images, and wraps them in a float-right div.  
 
This template takes two images, and wraps them in a float-right div.  
  
−
==== Example ====
+
==== Two Image Example ====
 
<tt><nowiki>{{floatRight|[[File:Spotless-Group.png|81x30px]]|{{Deals|ArrowR}}}}</nowiki></tt><br/>
 
<tt><nowiki>{{floatRight|[[File:Spotless-Group.png|81x30px]]|{{Deals|ArrowR}}}}</nowiki></tt><br/>
 
{{floatRight|[[File:Spotless-Group.png|81x30px]]|{{Deals|ArrowR}}}} will give:
 
{{floatRight|[[File:Spotless-Group.png|81x30px]]|{{Deals|ArrowR}}}} will give:
 +
 +
==== Three Image Example ====
 +
<tt><nowiki>{{floatRight|[[File:Spotless-Group.png|81x30px]]|{{Deals|ArrowR}}|[[File:Spotless-Group.png|81x30px]]}}</nowiki></tt><br/>
 +
{{floatRight|[[File:Spotless-Group.png|81x30px]]|{{Deals|ArrowR}}|[[File:Spotless-Group.png|81x30px]]}} will give:
  
 
<includeonly>[[Category:WikiCorporates templates]]</includeonly>
 
<includeonly>[[Category:WikiCorporates templates]]</includeonly>

Latest revision as of 15:18, 24 September 2020

Irritatingly, MediaWiki's implementation of [[File:...|right/left]] for images does not allow the option of a span, but only a div. This means that floating two or more images side-by-side is not possible, as the div forces them onto separate lines.

This template takes two images, and wraps them in a float-right div.

Two Image Example

{{floatRight|[[File:Spotless-Group.png|81x30px]]|{{Deals|ArrowR}}}}

Spotless-Group.pngDeals-Arrow-Right.svg

will give:

Three Image Example

{{floatRight|[[File:Spotless-Group.png|81x30px]]|{{Deals|ArrowR}}|[[File:Spotless-Group.png|81x30px]]}}

Spotless-Group.pngDeals-Arrow-Right.svgSpotless-Group.png

will give: