CSS Properties - CSS Properties Anatomy of a CSS rule A CSS...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
1 CSS Properties Anatomy of a CSS rule A CSS rule is made up to two parts: the selector , which states which tag (element) the rule selects, and the declaration , which states what happens when the rule is applied. p { color: red; } In the tables the following conventions are used: Rows shown in blue are shorthand rules that combine several properties into a single declaration. Values shown in blue are the actual values that can appear as property values for the specified property. Values shown in italics and black are representative of a type of value that can be specified for the specified property. The selector The declaration property value
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 background Property Description Values background Shorthand property for setting all background properties in one declaration. background-color background-image background-repeat background-attachment background-position background-attachment Sets whether a background image is fixed or scrolls with the rest of the page. scroll fixed background-color Sets the background color of an element. color-rgb color-hex color-name transparent background-image Sets an image as the background url none background-position Sets the starting position of a background image top left top center top right center left center center center right bottom left bottom center bottom right x% y% xpos ypos background-repeat Sets if/how a background image will be repeated repeat repeat-x repeat-y no-repeat
Background image of page 2
3 border Property Description Values border Shorthand property for setting all the properties for the four borders in one declaration border-width border-style border-color border-bottom A shorthand property for setting all the properties for the bottom border in one declaration border-bottom-width border-style border-color border-bottom-color Sets the color of the bottom border border-color border-bottom-style Sets the style of the bottom border border-style border-bottom-width Sets the width of the bottom border thin medium thick length border-color Sets the color of the four borders, can have between 1 and 4 colors specified color border-left A shorthand property for setting all the properties of the left border in one declaration. border-left-width border-left-style border-left-color border-left-color Sets the color of the left border border-color border-left-style Sets the style of the left border border-style border-left-width Sets the width of the left border thin medium thick length border-right A shorthand property for setting all the properties of the right border in one declaration. border-right-width border-right-style border-right-color border-right-color Sets the color of the right border border-color border-right-style Sets the style of the right border border-style border-right-width Sets the width of the right border thin medium thick length
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 border (continued) Property Description Values border-style A shorthand property for setting the style for all four borders in one declaration. Can have from 1 to 4 styles. none
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 17

CSS Properties - CSS Properties Anatomy of a CSS rule A CSS...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online