Styling
< User:L10nM4st3r | Wikihelp
Div tags edit
Syntax edit
<div style="border:1px solid black; margin-right:2em;"> Text </div>
Notes edit
- Can be used inside another
div
tag - Creates a new line
Span tags edit
Syntax edit
<span class="" style="color:red;"> Text </span>
Notes edit
- Can be used inside
div
and otherspan
tags - Does not support some styles, including width, hight, and float
Inline styles edit
Syntax edit
style="color:red;"
Works for pretty much every tag as well for wikitables. What rules it uses (div or span) depends on the tag. Tables generally use the
rules, for example.
Classes edit
- plainlinks (Removes the icon after external links)
Styles edit
- font-size: 100%
- color: black (text color)
- text-align: left (set the text's align. Can be:
left
,right
orcenter
) - float: none (Makes it float, allowing there to be two columns of text going down. Can be
left
,right
, ornone
) - background-color: none (can be any HTML color)
- border: 0px solid black
- margin: 0 0 0 0em (Adds a margin on the outside.) Also:
- margin-left
- margin-right
- margin-top
- margin-bottom
- Simmilar in style:
- padding: 0 0 0 0em (Adds space inside it.)
- width: 100%
- display: block (
inline
shows it on the same line.block
shows it on a new line.none
hides it) - position: (
reletive
allows it to move while keeping it in the same place.fixed
shows it at the top of the screen.absolute
is the same as "relative" but moves content to take up the space the object used to use)- Can be moved with:
- top: 0px (positive numbers move it downward, negative numbers upward)
- left: 0px (positive numbers move it right, negative numbers left)
- bottom and right are also supported and give the opposite to top and left respectively
- Can be moved with:
- width (sets the width. See measurements)
- min-width (sets a minimum width, but may grow in size to use available space)
- height (sets the height)
Measurements edit
- 0px (pixels)
- 0em
- 0% (percentage of fillable space)