Return to XHTML CSS...
Text font family:body { font-family: arial, helvetica; }
|
Text font sizes:body { font-size: medium; } body { font-size: medium; color: #003366; }
|
Text font weights:
|
Text decoration:a: link { color: #336666; text-decoration: none; }
|
Text alignment:.centered { text-align: center; } text-align: left; text-align: right; text-align: center; text-align: justified |
Other Text Options:color: #CC9966; .innertable { border: groove thin #333333; } em { color: #996699; } background-color: #CC9966; border: groove thick #66CC66; border: dotted thin border: dashed medium border: solid thick border: double thin border: ridge medium border: inset thick border: outset thin |
Images will often display a border around them. You can turn the border off with the following CSS:
img { border-style: none; } or img { border: 0; }
notice how the paragraphs contains indented text: .indent { margin: 20px; }
You can also "float" images to the right or left of a paragraph by inserting the image inside it's own paragraph, then attach the CSS "float" to the paragraph containing the image. You can't attach the float inside the image coding!
Unordered List Options:ul { list-style-type: disc; }
|
Ordered List Options:
|
a: link { color: #0033cc; text-decoration: underline; }
a: visited { color: #663399; text-decoration: underline; }
a: hover { color: #006600; text-decoration: none; }
a: active { color: #ff0000; text-decoration: none; }
Special Classes are often used when you wish a word, a line of text, or a paragraph to have something different about it - such as a smaller size or different color:
.navbar { background-color: #ffcc33; }
.navbar a: link { color: #0033cc; text-decoration: underline; }
.navbar a: visited { color: #663399; text-decoration: underline; }
.navbar a: hover { color: #006600; text-decoration: none; }
.navbar a: active { color: #ff0000; text-decoration: none; }
table: {width: 100%; border: thin outset #9C0000; } |
td,th { vertical-align: top; } |
©2004, Linda Baker
Last Updated:
January 16, 2012