Difference between revisions of "CSS: Basics"
(→Syntax) |
(→Modifying the Background) |
||
Line 31: | Line 31: | ||
<ul> | <ul> | ||
<li>background-image</li> | <li>background-image</li> | ||
+ | <li>background-attachment</li> | ||
+ | <li>background-position</li> | ||
</ul> | </ul> |
Revision as of 09:47, 14 December 2011
Contents
Syntax
As mentioned beforehand, the CSS syntax is
element { property: value; }
After evert property:value statement, there must be a semicolon, a ";". The last statement in an element does not require a semicolon, but it is a good practice to do so anyway.
CSS ignores whatever whitespace, so you can write CSS many ways:
element{property:value;} element { property:value; } etc.
However, it is a good practice to do it the first way; it's more readable, and it's easy to organize and edit.
Elements Usually Edited With CSS In AoPS User Blogs
The body element
In the AoPS User Blogs, the body element is most commonly modified for the:
- Background Image/Color
- Font used generally in the entries and sidebar
Modifying the Background
The two most common things done to the background of an AoPS User Blog are setting a background image or color. Some of the most commonly used properties for a background image:
- background-image
- background-attachment
- background-position