advantages for using css
easy to update & change - change one style sheet
can apply a background color to anything
change main body bg color
body {
background-color:#000;
}
p {
background-color:#09C;
}
p element is a block element - takes up entire width
default color of an element is transparent - if you want any elements in doc to be trans - just leave blank
colour values can be represented in variety of ways - most common - hexidecimal
hexidecimal generally made up of 6 digits #FF00FF
1st 2 digits = red
2nd 2 digits = green
3rd 2 digits = blue
can also be represented using 3 digits #F0F
also can use keywords - not recommended - support varies from browser to browser and disallowed in w3c accessability standards - more info at:
http://www.w3.org/TR/WCAG10-CSS-TECHS/#style-colors
can also specify using RGB
p
{background-color:rgb(18%, 25%, 70%)
}
or
p {
background-color:rgb(200, 150, 50)
}
Tuesday, July 28, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment