Prev | Current Page 48 | Next

Charles Wyke-Smith

"Stylin' with CSS: A Designer's Guide 2nd Edition"


??? Inline styles override the same styles you de?¬? ne with embedded
styles (described next), which override global styles you de?¬? ne
in style sheets. (See ???The Cascade??? later in this chapter for
details on this.)
Embedded Styles
You can place a group of CSS styles in the head of your XHTML document.
These are known as embedded styles (or page styles) because
they are part of the page (or embedded in it). Embedded styles work
like this:

Embedded Styles example


STYLIN??™ WITH CSS - CHAPTER 2 30


The style tag tells the browser it is about to encounter code other
than XHTML; the tag??™s attribute states that the code is CSS.
Here??™s what you need to know about embedded (or page) styles:
??? The scope of embedded styles is limited to the page that contains
the styles.
??? If you are only publishing a single page with these particular
styles, you can embed the styles in the head of the document,
although you are not truly separating the styles from the content;
they are still in the same document. You will become
familiar with embedded styles as you follow along with the
hands-on single-page examples in this chapter.


Pages:
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60