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

Formatting an empty [
style
] tag

Imagine CSS to be something like ordering at a fancy restaurant (or Denny's if you live in the US), as weird as that sounds. You're escorted to a seat, then the waitress/waiter takes your order. They write down where you are seated (in this situation) and bring you your order when it's ready! With that in mind, let's begin: First, you start with a name for your Style (i.e. the name of your party). In this example, you're going to be called the Smith Family Reunion. Classes start with a period, and your class can be called whatever your heart desires! Periods let the code know that they need to look for the class that is featured after the period. Classes can contain the alphabet and underscores, but not hyphens, other special characters, numbers or even spaces.
[style]
.smith_family
[/style]
Don't stop here! We need to give the charming waitstaff our order. To announce what you want to be coded (or what you want to eat), you use curly brackets, or { and } (try hitting Shift + [ and ]). Your order will go inside of these!
[style]
.smith_family
{ }
[/style]
The cook will be so confused because we didn't tell them what we want! Let's throw in a bit of fancy CSS.
[style]
.smith_family
{
text-decoration
:
underline
; }
[/style]
They're ordering one helping of underlined text? Coming right up!
Wow, that was anti-climatic. Now we just have an underline. But how did we take the Smith's order and make it?
[styleclass
=
smith_family
]
Here's how we made it!
[/styleclass]
Notice how
.smith_family
(with a period) became
smith_family
(without a period)? That's how [
styleclass
] works. In the [
style
] code, we needed to tell Sally that
smith_family
is a class, but we don't need to in [
styleclass
]. This also applies to certain codes that were made by Niet (panel, expbar, and tooltips) but not ones used by other sites (table, b, h3, div). Remember: Inside the BBCode, give a class (with a period!), add { and }, add some CSS, then call it with [
styleclass
], without the period!
[styleclass
=
smith_family
]
Now you can do it, too!
[/styleclass]
[style]
.smith_family
{
text-decoration
:
underline
; }
[/style]
© PokéFarm 2009-2024 (Full details)Contact | Rules | Privacy | Reviews 4.6★Get shortlink for this page