Book HomeCascading Style Sheets: The Definitive GuideSearch this book Sunday 25th of February 2018 10:18:57 PM

10.6. Borders

In CSS1, there are quite a few properties devoted to setting borders around element boxes, such as border-top-width and border-color, not to mention border itself. CSS2 adds a even more border properties, most of which are aimed at giving the author even more

SAX, DOM and XML are very developer friendly because developers are going to decide whether this technology will be adopted by the majority and become a successful effort towards the goal of interoperable, platform, and device independent computing.

XML is web enabled

XML is derived from SGML, and so was HTML. So in essence, the current infrastructure available today to deal with HTML content can be re-used to work with XML. This is a very big advantage towards delivering XML content using the software and networking infrastructure already in place today. This should be a big plus in considering XML for use in any of your projects, because XML naturally lends itself to being used over the web.

Even if clients don't support XML natively, it is not a big hindrance. In fact, Java with Servlets (on the server side) can convert XML with stylesheets to generate plain HTML that can be displayed in all web browsers.

specific control of the borders. Before, it was difficult to set a specific color or style for a given side of the border, except through properties like border-left, and that could require more than one value. The new CSS2 properties address this, and their names are pretty self-explanatory:

border-top-color
border-right-color
border-bottom-color
border-left-color
border-top-style
border-right-style
border-bottom-style
border-left-style


Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.

elements, although as we can see in Figure 6-12,this would have the effect of setting that color on all inputs, fromtext to radio-button to checkbox inputs:

SELECT {color: rgb(33%,33%,33%);}INPUT {color: gray;}
Figure 6-12

Figure 6-12. Changing form element foregrounds

Note in Figure 6-12 that the text color next to thecheckboxes is still black. This is because we've only assignedstyles to elements like INPUT and

Figure 5-29

Figure 5-29. Small caps in use

As you may notice, in the display of the H1 element, there is a larger uppercase letter wherever an uppercase letter appears in the source and a small uppercase wherever there is a lowercase letter in the source. This may remind you rather strongly of text-transform: uppercase, with the only real difference that here, the uppercase letters are of different sizes. That's true, but the reason that small-caps is declared using a font property is that some fonts have a specific small-caps face. Thus, a font

An interesting thing about images is that they're laid on topof whateverbackground color you may have specified.If you're completely tiling GIF, JPEG, or other opaque imagetypes, this doesn't really make a difference, sincethey'll fill up the document background, leaving nowhere forthe color to "peek through," so to speak. However, imageformats with an alpha channel, such as PNG, can be partially orwholly transparent, and this will cause the image to be combined with Style declaration is made important, thereby raising its weight in the cascade. Important declarations override all others. In CSS1, important author styles override all reader styles, even important ones. In CSS2, this is reversed, so that important reader styles always win out over the author's styles, important or otherwise.

Example

:linkIE4 Y/Y IE5 Y/Y NN4 Y/Y Op3 Y/-

This pseudo-class applies to hyperlinks, but not named anchors. It sets the styles to be used for

1.4. Bringing CSS and HTML Together

We keep visiting the point that HTMLdocuments have an inherent structure. In fact, that's part ofthe problem with the Web today: too many of us forget that documentsare supposed to have an internal structure, which is altogetherdifferent than a visual structure. In our rush to create thecoolest-looking pages on the Web, we've bent, warped, andgenerally ignored the idea that pages should contain information thathas some structural meaning.