twistedpuppy
Siriusly Twisted
- 1,354
- Posts
- 16
- Years
- Seen Jul 18, 2015
CSS Guide & Helpful Tips
Introduction
If you've looked around a couple of threads in Trade Corner and PokéCommunity, you'll notice that some have been beautifully designed. This design is known as CSS, or Cascading Style Sheets. CSS is a style sheet language commonly used for styling web pages. Many PokéCommunity members use CSS to give a more personalized & organized look to their posts. In this guide, we will help you stylize your own posts with these helpful hints.
How It's Done
Below are listed codes for you to utilize in editing the appearance of your posts.
Putting it all together
You may find yourself wondering how to start your CSS coding. Well to put it all together you first need to start with a BB code. A BB code is a set of tags based on the HTML language. You may already be familiar with this, as it is commonly used around the forums to add color, size, font, or position your posts. To begin your CSS you'll need to start off with one of these codes.
Alias of [css-div]
Allows CSS usage in a div tag
Creates a HTML block that accepts CSS.
Sizing Codes
Sets the size of the height.
Sets the size of the width.
Positioning Codes
Sets the positioning for the CSS;
Static (always positioned according to the normal flow of the page)
Fixed (positioned relative to the browser window)
Relative (positioned relative to its normal position)
Absolute (positioned relative to the first parent element that has a position other than static).
Sets the spacing between the border and the content inside.
Sets the position of the border, padding, and content according to the px number.
Background Codes
Changes the color of the background.
Displays a selected image as your background.
Sets the position of the background image.
Sets a background to repeat from left to right (repeat-x), repeat from top to bottom (repeat-y), or to not repeat at all (no-repeat).
Creates a visible, auto, or hidden scroll bar.
BorderCodes
Creates a border around the CSS;
dotted: Defines a dotted border
dashed: Defines a dashed border
solid: Defines a solid border
double: Defines two borders. The width of the two borders are the same as the border-width value
groove: Defines a 3D grooved border. The effect depends on the border-color value
ridge: Defines a 3D ridged border. The effect depends on the border-color value
inset: Defines a 3D inset border. The effect depends on the border-color value
outset: Defines a 3D outset border. The effect depends on the border-color value
Sets the width of the border.
Changes the color of the border.
Font Codes
Changes the color of the font.
Displays the font style of your choice.
Changes the size of the font.
Changes the font to normal or bold.
Changes the font's style to normal, italic, or oblique.
Specifies whether or not a text should be displayed in small-caps (lower case letters capitalized).
Sets the size of spacing between letters.
Sets the size of spacing between words.
Sets the size of spacing between lines.
Aligns the text according to position; center, right, left, justify (stretches the lines so that each line has equal width)
You may find yourself wondering how to start your CSS coding. Well to put it all together you first need to start with a BB code. A BB code is a set of tags based on the HTML language. You may already be familiar with this, as it is commonly used around the forums to add color, size, font, or position your posts. To begin your CSS you'll need to start off with one of these codes.
Code:
[PLAIN][cd="(coding used here)"][/cd][/PLAIN]
Code:
[PLAIN][div="(coding used here)"][/div][/PLAIN]
Code:
[PLAIN][div="(coding used here)"][/div][/PLAIN]
Sizing Codes
Code:
height: (100px, 500px, 1000px);
Code:
width: (100px, 500px, 1000px);
Positioning Codes
Code:
position: (absolute, relative, static, fixed);
Static (always positioned according to the normal flow of the page)
Fixed (positioned relative to the browser window)
Relative (positioned relative to its normal position)
Absolute (positioned relative to the first parent element that has a position other than static).
Code:
padding: (1px, 5px, 10px);
Code:
margin-top: (1px, 5px, 10px);
margin-bottom: (1px, 5px, 10px);
margin-left: (1px, 5px, 10px);
margin-right: (1px, 5px, 10px);
Background Codes
Code:
background-color: (hex, rgb, color name);
Code:
background-image: url('https://www.imagesite.com/picture.png');
Code:
background-position: (top, bottom, center, right, left);
Code:
background-repeat: (repeat-x, repeat-y, no-repeat);
Code:
overflow: (visible, auto, hidden);
BorderCodes
Code:
border-style: (dotted, dashed, solid, double, groove, ridge, inset, outset);
dotted: Defines a dotted border
dashed: Defines a dashed border
solid: Defines a solid border
double: Defines two borders. The width of the two borders are the same as the border-width value
groove: Defines a 3D grooved border. The effect depends on the border-color value
ridge: Defines a 3D ridged border. The effect depends on the border-color value
inset: Defines a 3D inset border. The effect depends on the border-color value
outset: Defines a 3D outset border. The effect depends on the border-color value
Code:
border-width: (1px, 5px, 10px);
Code:
border-color: (hex, rgb, color name);
Font Codes
Code:
color: (hex, rgb, color name);
Code:
font-family: (arial, century gothic, times new roman);
Code:
font-size: (1px, 5px, 10px);
Code:
font-weight: (normal, bold);
Code:
font-style: (normal, italic, oblique);
Code:
font-variant: (normal, small-caps, inherit);
Code:
letter-spacing: (1px, 5px, 10px);
Code:
word-spacing: (1px, 5px, 10px);
Code:
line-height: (10px, 20px, 30px);
Code:
text-align: (center, right, left, justify);
Example
In the example I'll be providing, I'll use the [cd=""][/cd] code to begin my CSS. So lets start off with the BB code, a background color, and a set height and width.
Code:
[PLAIN][cd="background-color: #C0C0C0; height: 200px; width: 200px;"]As you can see, I went with a silver background and a height and width of a 200px. Next we'll choose a font family, add color to the font, and a size for the font.[/cd][/PLAIN]
As you can see, I went with a silver background and a height and width of a 200px. Next we'll choose a font family, add color to the font, and a size for the font.
Code:
[PLAIN][cd="background-color: #C0C0C0; height: 200px; width: 200px; color: black; font-family: arial; font-size: 10px;"]We choose black as the color of the font. Then Arial as the type of font, and finally a size of 10px for the font. Now for the final touch, we'll add padding.[/cd][/PLAIN]
We choose black as the color of the font. Then Arial as the type of font, and finally a size of 10px for the font. Now for the final touch, we'll add padding.
Code:
[PLAIN][cd="background-color: #C0C0C0; height: 200px; width: 200px; color: black; font-family: arial; font-size: 10px; padding: 10px;"]We've added the padding and this is the final result of your CSS.
[IMG]https://floatzel.net/pokemon/black-white/sprites/images/228.png[/IMG]
As you can see all it takes is a few easy steps to complete your CSS.[/cd][/PLAIN]
We've added the padding and this is the final result of your CSS.
As you can see all it takes is a few easy steps to complete your CSS.
As you can see all it takes is a few easy steps to complete your CSS.
Links
Below are some helpful links listed to further expand your newly found CSS skills.
CSS Tutorial at w3schools
The PokéCommunity Forums - BB Code List
PokéCommunity's CSS Help & Discussion Thread
December Hex Hub - Various color hex codes
Last edited by a moderator: