The second article in our series covering Adobe GoLive we'll be working with images, CSS, and JavaScript. (This chapter comes from Teach Yourself Adobe Creative Suite, by Mordy Golding, Sams, 2004, ISBN: 067232752X.)
Using Adobe GoLive CS, Part 3 - Using Cascading Style Sheets (Page 9 of 15 )
GoLive CS's support for Cascading Style Sheets has been dramatically updated and now complies with the CSS2 specification. Not only does the Layout mode do a better job of rendering CSS designs, but the Style Sheet Editor itself has been redesigned to make it more efficient and easier to use.
Those of you familiar with paragraph and character styles in page layout applications will probably grasp the basics of CSS readily, but the scope of the CSS spec falls well beyond altering font faces, sizes, and colors. CSS can be used to position elements, not merely text, on a page. In fact, if you have played with layers in GoLive, you were working with CSS, because a layer actually writes a <DIV> tag which defines an area, and that area is positioned (and can be styled) with CSS.
Internal Versus External
Ever wonder why they're called Cascading Style Sheets instead of simply style sheets? It's because you can define styles in several ways, which at times could result in conflicting styles. The method of resolving this conflict is called precedence. For example, you can define a style internally, meaning that it's written into a page, or externally, meaning that the style is defined in a separate document and linked to the page. In such a case, any conflicting styles in the internally defined styles take precedence over those defined in the external styles. Likewise, a style can be written inline, which means that it is applied to only one element on a page rather than the whole page like an internal style. In this case, the inline style would take precedence over the internal style.
So if I have an external style sheet that defines a piece of text as red, and no internal or inline style on that text, it appears red. If I also have an internal style declaring that text to be blue, the internal would win and the text would be blue. But if I also had an inline style defining the text as green, the inline style would triumph over the others and the text would appear green.
This chapter is from Teach Yourself Adobe Creative Suite, by Mordy Golding (Sams, 2004, ISBN: 067232752X). Check it out at your favorite bookstore today.