Difference between revisions of "Template:Spacer"

From GodWiki
Jump to: navigation, search
m (Needs to be styled display:inline-block as well)
(Tags: Mobile edit, Mobile web edit)
(I don't know why I had it in my head that this had to be an inline-block, but block seems to work just as well — and avoids triggering the extra vertical whitespace of an inline-block. Trying it out...)
Line 1: Line 1:
<div style="display:inline-block;min-width:15em;height:1px;"> </div><noinclude>
+
<div style="display:block;min-width:15em;height:0px;"> </div><noinclude>
 
{{doc|content=
 
{{doc|content=
This template inserts an <code>inline-block</code> spacer {{tag|div}} with <code>min-width: 15em</code> and <code>height: 1px</code>, which can be placed before paragraphs which would otherwise render alongside floated elements on mobile.}}
+
This template inserts an <code>inline-block</code> spacer {{tag|div}} with <code>min-width: 15em</code> and <code>height: 0px</code>, which can be placed before paragraphs which would otherwise render alongside floated elements on mobile.}}
 
[[Category:Templates|{{PAGENAME}}]]
 
[[Category:Templates|{{PAGENAME}}]]
 
[[Category:Formatting templates|{{PAGENAME}}]]
 
[[Category:Formatting templates|{{PAGENAME}}]]
 
</noinclude>
 
</noinclude>

Revision as of 00:01, 17 February 2019

📚 Documentation
This template inserts an inline-block spacer <div>...</div> with min-width: 15em and height: 0px, which can be placed before paragraphs which would otherwise render alongside floated elements on mobile.