Template:Spacer

From GodWiki
Jump to: navigation, search
📚 Documentation

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

The min-width of the spacer can be adjusted with the parameter |width=css_length (or |w= for short). The parameter accepts any valid CSS length expression, with units. (100px, 10em, 15rem, 16pt, 80vw,[1] etc.)

For example:

  • {{spacer|w=8em}} will insert a narrower spacer
  • {{spacer|width=40em}} will act like {{clear}} on most screens

Notes

  1. vw and other viewport units are still not well-supported, their use would likely cause problems.