SELECTOR is the HTML element that is to be defined. Thus, in many of our earlier examples, H3 was the selector.PROPERTY is the type of action or change desired such as font-family or color.
VALUE is the specific result such as red, green or blue for the property color or Arial or Courier for the property font-family.
What is most aggravating at this point with CSS though is that the various browser versions that can see CSS are quite inconsistent not only as to what properties and values they will display but also how they do so. There are lists of safe properties and values but I have yet to locate a list indicating clearly where both browsers *see* the style yet display it differently.
For example, the code below appears quite differently in IE4 and in Netscape4 as is shown by the screen capture images below the code. There is yet again a minor difference (not shown) with IE5 (an improvement actually).
<STYLE type="text/css">
<!--
li {
font-family: Arial
}
ol li {
background-color: green
}
ul li {
background-color: yellow;
font-weight: bolder;
color: red
}
-->
</STYLE>
So, at this point with CSS, I'm not going to get the results I was after for lists using it on the <LI> tag. But, there's a work around to get the results I wanted which was like the unordered list appears in IE4, a colored background for the whole list. [NOTE: I also tried using the <UL> and <OL> tags as the selectors with no significant improvement. ] By placing the lists in a table and using TD as the selector, I defined the property background-color and color (text) for the TD in the style sheet.
TD { background-color: yellow; color: red; font-family: Arial } This achieves the desired result BUT now ALL <TD>'s in my page are yellow with red Arial text, not exactly what I was after is it?
which brings us to the next, really neat, thing about CSS... CLASSES
| Intro | |
| Getting Started | Context/Cascade |
| Properties & Values | Classes |
| Resources | |
| © MaMaT | htmlhelp.rootsweb.com | Last edited on 28 Nov 1999 |