spacer

CSS Properties

 
This section of Iron Spider is devoted to my go-to list of CSS properties that were highly instrumental in the making of this website. Be advised that this is in no way, shape or form an exhaustive list of CSS properties and values. Therefore headings like 'Some Possible Values' should be taken literally (operative word: Some). The property lists are categorized according to thier functions.

Here's a list of the categories: Below you'll find all the property lists covered in this section. Each list also has a page of its own that you can visit for some comprehensive notes and examples on what the properties do, how they work and which HTML elements they apply to.




Font Styles



CSS Properties List 1 - Font Styles
Property NameSome Possible ValuesWhat It Does
font-family(Any font name)Sets the text typeface
font-size15px | 12pt | 0.5emSets the text size
font-weightbold | normalSet bold typeface?
font-styleitalic | normalSet italics typeface?
background(Any color) | url('example.jpg')Sets background
color(Any color)Sets the text color
line-height17px | normalSets line spacing







Dimensions, Padding and Margin



CSS Properties List 2 - Dimensions, Padding and Margin
Property NameSome Possible ValuesWhat It Does
width400px | 70%Sets width
height400px | 70%Sets height
padding10px | 5%Set padding on all 4 sides
padding-top10px | 5%Set padding on top
padding-bottom10px | 5%Set padding on bottom
padding-left10px | 5%Set padding on left side
padding-right10px | 5%Set padding on right side
margin10px | 5%Set margin on all 4 sides
margin-top10px | 5%Set margin on top
margin-bottom10px | 5%Set margin on bottom
margin-left10px | 5%Set margin on left side
margin-right10px | 5%Set margin on right side







Borders



CSS Properties List 3 - Borders
Property NameSome Possible ValuesWhat It Does
border1px solid blackDefines all borders
border-top1px solid blackDefines top border
border-bottom1px solid blackDefines bottom border
border-left1px solid blackDefines left border
border-right1px solid blackDefines right border







Backgrounds



CSS Properties List 4 - Backgrounds
Property NameSome Possible ValuesWhat It Does
background(All background properties at once)Sets background
background-color(Any color)Background color
background-imageurl('example.jpg')Background image
background-repeatrepeat-x | repeat-y | no-repeatTile background?
background-positiontop left | 50% 100%Position?
background-attachmentfixed | scrollFixed or scroll?







Position



CSS Properties List 5 - Position
Property NameSome Possible ValuesWhat It Does
positionrelative | absolute | fixedSets type of positioning
top20px | 10%Offsets element from top
left20px | 10%Offsets element from left
bottom20px | 10%Offsets element from bottom
right20px | 10%Offsets element from right







Float & Alignment



CSS Properties List 6 - Float & Alignment
Property NameSome Possible ValuesWhat It Does
floatleft | rightAligns block element
text-alignleft | center | right | justifyAligns text







Hyperlinks



CSS Properties List 7 - Hyperlinks
Property NameSome Possible ValuesWhat It Does
text-decorationunderline | overline | noneIs the link text underlined?
cursorcrosshair | default | helpSets the mouse pointer style
background(Any color)Rollover background color
displayblock | inlineSet link as block element?







See also:
External resources: