Template:Transheader

From Darkan
Jump to navigation Jump to search

[view] [edit] [purge] Template documentation

This documentation is transcluded from Template:Transheader/doc.

Example Text

The Transheader development template creates a line of text at the very top of a page and is only meant to be used in the userspace or some pages in the projectspace. This line of text is partially transparent, except for the text, and remains visible even when the user scrolls down the page.

Syntax

{{Transheader|text= |bgcolor= |color= |opacity= |radius= |style= }}

text

The text that will be displayed in the header. Defaults to "text"

bgcolor

The color used for the semitransparent background. It cannot be a colour name (such as "red") or a hexadecimal color code (such as "#0000FF"), but instead must be rgb color coordinates, in the format "r,g,b". A list of common colours and their respective rgb color coordinates can be found here. Defaults to white.

fgcolor

The color for the fully opaque text. Like bgcolor it must be rgb color coordinates. Defaults to black.

opacity

The degree of transparency assigned to the background, ranging from 0 (completely transparent) to 1 (completely opaque). Decimal values such as .25 and .7 are acceptable. Defaults to .5

radius

The radius of the corners. Accepts 4 px or em values in the format "1px 2px 2px 1px". The values refer to the following corners, in order: upper-left, upper-right, lower-right, lower-left. Users can also specify just one px value that applies to all 4 corners. Defaults to 0px (no curve) for all corners.

style

Any additional css attributes applied to the entire header such as borders, drop shadows, etc. See example for the proper syntax.

textstyle

Any additional css attributes applied to just the text.

Example

{{Transheader|bgcolor=0,128,0|color=128,0,128|text=Example Text|opacity=0.5|radius=10px|style=border:2px solid black|textstyle=font-weight:bold; text-decoration:underline;}}

...would create the header as shown above.