Loading...

Top
PFQ Banner

This is PokéFarm Q, a free online Pokémon collectables game.

Already a user? New to PFQ?

Single post in Styleclass and You: An Introduction

Forum Index > PokéFarm > Guides > Styleclass and You: An Introduction >

Niall's AvatarNiall
Niall's Avatar

[
css
] properties

Here you will find the codes to theme different parts, or properties, of posts. If you have more insight on more things to theme, send me a PM or post here! I'm positive I have missed a few things, so let me know! If you are unsure on how to use certain BBCodes, there is a link located inside that will take you to its guide on the Wiki. Check it out!

Links

Check me out on the Wiki!
[style]
a
{ }
[/style]
Changes what links look like in a post. This is required for all templates made by users. If you are up for it, links can also be coded for different states it's in:
a:link
{ }
for new, unvisited (by you) links,
a:visited
{ }
for the opposite, visited links,
a:hover
{ }
for when your mouse is hovering on the link, and
a:active
{ }
for when you are clicking and holding on a link. As a side note,
a:hover
{ }
must be used after
a:link
{ }
and
a:visited
{ }
(if you use it).
a:active
{ }
must be used after
a:hover
{ }
(if you use the first). Using this code will also change the color of hideboxes, accordions, and quotes with links in them. It is suggested you use both codes in case the link color does not go well with a skin's hidebox color. The SVG image (the little triangle) changes color with this code. Check out the "Panels and Hideboxes" section to learn more! Check out these examples to see other ways to manipulate links.

Using just one code

[style]
a
{
color
:
black
; }
[/style]

Using all four

[style]
a:link
{
color
:
black
; }
a:visited
{
color
:
red
; }
a:hover
{
color
:
green
; }
a:active
{
color
:
blue
; }
[/style]

Letter Spacing with transitions

[style]
a:link
{
color
:
black
; }
a:visited
{
color
:
red
; }
a:hover
{
color
:
green
;
letter-spacing
:
5px
;
transition
: all
1s
; }
a:active
{
color
:
blue
; }
[/style]

Simple Buttons

[style]
a
{
background
:
#aaa
;
padding
:
5px
; }
a:link
{
color
:
black
; }
a:visited
{
color
:
red
; }
a:hover
{
color
:
green
; }
a:active
{
color
:
blue
; }
[/style]

Headings

Check me out on the Wiki!
[style]
h1
{ }
h2
{ }
h3
{ }
[/style]
Changes what titles look like.

I'm h1

and I'm the largest.

I'm h2

and I'm pretty large.

I'm h3

and I'm a little larger than normal text. Normally, each uses up their own line, but this can be changed with CSS! Check out the examples below!
Be careful changing
h3
as this is what is used to theme the titles on hideboxes, quote boxes, accordions and the like. Check out the "Panels and Hideboxes" section to learn more!

Adding Underlines

[style]
h1
{
text-decoration
:
underline
; }
h2
{
text-decoration
:
overline
; }
h3
{
text-decoration
:
line-through
; }
[/style]
Normally on PFQ, headings don't have any lines. These examples have any kind of line you like: Underneath, on top, or in the middle!

Heading 1

.

Heading 2

.

Heading 3

.

Changing Colors

: bold & : italics

b { }
and
i { }
Change how the text acts when surrounded by [
b
] and [
i
] tags. Defaults to
b { font-weight: bold; }
and
i { font-style: italic; }

Example #3: Bold and Italics

.example3 { b { color: red; } i { color: goldenrod; } }
Hello world! Hello world! Hello world!

: underline

u { }
Change how the text acts when surrounded by [
u
] tag, just like the above section! Defaults to
u { text-decoration: underline; }

Example #4: Underline

.example4 { u { text-decoration: line-through; } }
Hello world! Hello world!

: tooltips

.tooltip_content { }
and
span.bbcode_tooltip { }
Changes the tooltips. "Content" is used for the hovered box and the "Span" is for the anchor (what you hover over)

Example #5: Tooltip

.example5 { span.bbcode_tooltip { border-bottom: 0.5px solid black; } .tooltip_content { background-color: white; color: navy; border-color: red; } }
Hello world!
Hola el mundo!

: tables

table { } th { } td { }
Using the same spelling as the BBCode,
table
modifies the table itself,
th
modifies the header boxes, and
td
is for regular boxes. Don't forget to add [
tr
] in the BBCode! A common use for this is
table { margin:0px auto; }
. This centers the table in the middle of its container instead of aligning left, as it defaults to on PFQ! Click here to learn how to use math in BBCodes!

Example #6: Tables

.example6 { table { margin: 0px auto; border: 0px; } td { border: 0.5px red solid; background-color: white; color: black; text-align: center; } th { border: 0px; background-color: navy; color: white; text-align: center; } }
My Favorite Berries
199
558
Total # of items: 757

: images

img { }
Manipulates images used in posts. Applies to anything that makes an image, even [
pkmn
]!

Example #7: Images

.example7 { img { background-color: cyan; } }
Look at my cute Pokémon!

: panels

.panel { &>h3 { } &>div { } }
H3
refers to the banner, or the box title, while
div
is the contents inside, usually hidden inside. To change the text color in the h3 section, add
a { color: something; }
(for links/click to open) and
color: something;
for plain text. You will need both because anything that opens is a link and static headers use regular color coding. This is tricky, so study the example carefully! Also, be sure not to use too different of colors for the inside of panels, as all BBCode will act the same inside without changing the code. For example, if links and the background are the same, they will clash! You can add codes into the inside of
div
, just like we changed the style of links in the headers!

Example #8: Panels

.example8 { .panel { border: 0.25px solid brown; background-color: hidden; &>h3 { border-bottom: 1.5px solid black; color: black; background-color: orange; border-radius: 2px; padding: 3px; a { color: brown; text-decoration: none; } a:hover { color: blue; } &>div { color: black; background-color: white; border: 0.5px solid maroon; border-radius: 2px; padding: 3px; } } }

Hello world!

Hello!

Hello world!

Hello!

: progress bars

.expbar { &>span { } &>div { } }
"Expbar" controls the background/empty design and "Div" is the filling bar. The "right border" in the example below is that little crack that leads the filling bar, letting you see where the colors change a bit easier. Click here to learn more about what Progress Bars can do!

Example #9: Progress Bars

.example9 { .expbar { color: maroon; background-color: gray; border: 1px black solid; &>div { background-color: pink; border-right: 2.5px solid black; } } }
x458

: lists

ul { }
and
ol { }
Mainly used to define what the bullets are. To replace bullets with text, use
ul { list-style-type: something; }
with either "ul" or "ol". Click here for some different styles! Please note that they are case-sensitive, including capitalization. To use an image for bullets, use
list-style-image: url(' link ');
To change different levels of bullets, use
ul.a { } ul.b { }
and on and on! There is so much to do with this class, yet it's not a very used BBCode, so I'll let you do some more searching if you aren't satisfied!

Example #10: Lists

.example10 { ol { list-style-type: lower-alpha; } ul { list-style-type: square; } }
  1. Hello world!
  2. Hello world!
  3. Hello world!
  4. Hello world!
  • Hello world!
  • Hello world!
  • Hello world!
  • Hello world!
© PokéFarm 2009-2024 (Full details)Contact | Rules | Privacy | Reviews 4.6★Get shortlink for this page