Lady Saxophone
(?)Community Member
- Report Post
- Posted: Tue, 28 Jul 2015 16:20:07 +0000
♜CHAPTER 1: THE BEGINNERS GUIDE TO CSS
▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀
▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀
▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀
▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀
- This guide is meant as an introduction to coding for those unfamiliar with CSS.
Be aware that the subjects cover here only brush the surface of coding, and there is much much more you can do with it.
Also, this guide mostly covers Current (v2) layouts since those are easier for beginners.
What is CSS?
- CSS stands for Cascading Style Sheets. It is used in conjunction with HTML and Javascript (JS) to design webpages.
In comparison to a human body, think of HTML as the skeletal structure, JS as the organs and nerves, and CSS as the outside appearance: skin, hair, and eye color, voice, etc. While there are many neat and pretty things CSS can do, be aware that it is not HTML or JS. Its abilities are limited by what it is designed to be for. Gaia will not let us edit the HTML or JS of the page for security reasons, so you are stuck with just CSS..
How can I use CSS to make a profile?
- You can type your own CSS codes into your Theme Override Box (found under Profile Preferences)
For Current (v2) profiles, this box can also be accessed under "Edit My Profile > Theme > CSS"
The Basic Set-Up of CSS
- selector{property: value;}
A selector is the element on the page which you want to target and change.
Following that, properties are the specific part of the selector which you want to change, like backgrounds, font sizes, borders, etc.
Finally, values are what you are changing the property to. For example, if "background" is your property and you want to have a red background, you would use "red" for your value. Values can vary between numbers, colors, keywords, and other things depending on the property.
Combining Codes
- Let's say you have something which looks like this
- .panel{background: white;}
.panel{color: black;}
.panel[font-size: 10px;}
.panel h2{background:#6396E7;}
.panel h2{color: white;}
- .panel{background: white; color: black; font-size: 10px;}
.panel h2{background:#6396E7; color: white;}
This helps to both save on space and keep you from having duplicate or contradicting codes.
Parent, Child, and Sibling Relationships
- Some of this guide will be mentioning parents, siblings, and children.
We're not referring to an actual family here, but rather the HTML structure of the page.
Parents are elements which are outer containers of other elements
Child are elements which are inside of these outer containers
Siblings are similar childen/parents on the same level
For example: #columns is the parent of #column_1, #column_2, and #column_3
#column_1 ~ 3 are all children and are all siblings because they are set up the same way
.panel is a child of #column_1 ~ 3, and panels inside of the same column are all siblings of each other
This is important to keep in mind while coding, since sometimes coding applied to parents will affect their children
(coding applied to children will not affect their parents though)