{{Inputbox}} will display a short line of text as if being the content of a basic input box. One use is to emulate the display of the edit summary box.
{{Inputbox|/* Heading */ my summary}}
<NOWIKI>...</NOWIKI>
.Default values are usually inherited from
class=messagebox
.
{{Inputbox|width=20%|This is gonna be too large for me, ouch! ouch! ouch!}}
This box isn't 20% wide but grows to make a long text visible (as per default overflow=visible).
{{Inputbox|width=20%|overflow=hidden|This is gonna be too large for me, ouch! ouch! ouch!}}
This box sticks to 20% width and hides the end of a too long text.
{{Inputbox|width=20%|overflow=scroll|This is gonna be too large for me, ouch! ouch! ouch!}}
This box sticks to 20% width but adds an underside scrollbar to make a too long text available.
{{Inputbox|style=background-color:yellow; color:red; width:40%;|My eyes! My eyes! The goggles do nothing!}}
This box uses a freeform style to specify anything that can be done in CSS, including the width.
Proper security require that password fields obscure their contents.
Login: | Komusou
|
Password: | ********
|
Since an actual <FORM><INPUT> isn't allowed by wikicode, the appearance has to be emulated. The CSS code is designed to avoid hardcoded colors and sizes and should be modified with care, with respect to the following concerns:
"border:0.15em;"
uses a non-absolute border width that will render approximatively the same on any screen (as opposed to a hardcoded width in pixels)."inset"
tweaks the inherited "messagebox" appearance to give a 3D inset box approximation, as rendered by each browser for this value."padding:0.1em;"
is required to avoid the text being stuck to the border in browsers that strictly respect the padding value, and use again a relative em value instead of pixels. (For instance in Opera, "padding:0" would do what it says)."margin:0.1em;"
is intended to avoid several boxes stuck one to the other, using a relative em value instead of pixels.The result isn't a perfect 3D input box, but should provide decent results for everyone, regardless of browser, color settings, and resolution.