200 likes | 227 Views
Cascading Style Sheets. Billy Toy wdt102@psu.edu. Cascading Style Sheets. Syntax review How to Implement style sheets Background properties Text properties Font properties Border properties Padding properties Margin properties List properties. Cascading Style Sheets (Continued).
E N D
Cascading Style Sheets Billy Toy wdt102@psu.edu
Cascading Style Sheets • Syntax review • How to Implement style sheets • Background properties • Text properties • Font properties • Border properties • Padding properties • Margin properties • List properties
Cascading Style Sheets (Continued) • Dimension properties • Classification properties • Positioning properties
CSS: Syntax • selector {property: value} • p {font-family: “sans serif”} • p {font-family: “sans serif”; color: blue} • p{font-family: “sans serif”;color: blue;text-align: left}
CSS: Syntax (Continued) • h1, h2, h3, h4, h5, h6{color: red} • p.left {text-align: left}p.right {text-align: right} • .center {text-align: center}.orangeBg {background-color: orange}
CSS: Implementation • External Style Sheet<head><link rel=“stylesheet” type=“text/css”href=“goodstyle.css” /></head>
CSS: Implementation (Continued) • Internal Style Sheet<head><style type=“text/css”><!--p {color: black; margin-left: 15px}.quotetext {color: navy; font-style: italic}--></style></head>
CSS: Implementation (Continued) • Inline styles<p style=“color: green; font-weight: bold”>
CSS: Background properties • background-color • background-image • background-repeat • background-position • background-attachment
CSS: Text properties • color • letter-spacing • text-align • text-decoration • text-indent • text-transform
CSS: Font properties • font-family • font-size • font-style • font-variant • font-weight • font (shorthand)
CSS: Border properties • border-style • border-color • border-width
CSS: Margin properties • margin-bottom • margin-left • margin-right • margin-top • margin (shorthand)
CSS: Padding properties • padding-bottom • padding-left • padding-right • padding-top • padding (shorthand)
CSS: List properties • list-style-type (unordered) • list-style-type (ordered) • list-style-image • list-style-position • list-style (shorthand)
CSS: Dimension properties • height and width • line-height
CSS: Classification properties • display • float • position: relative • position: absolute • visibility • cursor
CSS: Positioning properties • clip • left and top • right and bottom • overflow • vertical-align • z-index
Credit • Examples and CSS test editor located at:http://www.w3schools.com/
Questions? • William D. Toywdt102@psu.edu Thank you.