SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 62 | Next

Craig Grannell

"The Essential Guide to CSS and HTML Web Design"


As you can see, this method involves using the style attribute, and it??™s only of use in very
specific, one-off situations. There??™s no point in using inline styles for all styling on your
website??”to do so would give few benefits over the likes of archaic font tags. Inline styles
also happen to be deprecated in XHTML 1.1, so they??™re eventually destined for the chop.
The cascade
It??™s possible to define the rule for a given element multiple times: you can do so in the
same style sheet, and several style sheets can be attached to an HTML document. On top
of that, you may be using embedded style sheets and inline styles. The cascade is a way of
dealing with conflicts, and its simple rule is this:
In the following example, the second font-size setting for paragraphs takes precedence
because it??™s closest to paragraphs in the HTML:
The value closest to the element in question is the one that is applied.
THE ESSENTIAL GUIDE TO CSS AND HTML WEB DESIGN
16
p {
font-size: 1.1em;
}
p {
font-size: 1.2em;
}
Subsequently, paragraphs on pages the preceding rule is attached to are rendered at
1.2em. If a similar rule were placed as an embedded style sheet below the imported/linked
style sheet, that rule would take precedence, and if one were applied as an inline style
(directly in the relevant element), then that would take precedence over all others.
CSS uses the concept of inheritance. A document??™s HTML elements form a strict hierarchy,
beginning with html, and then branching into head and body, each of which has numerous
descendant elements (such as title and meta for head, and p and img for body).


Pages:
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
Zakola Kreta drukarnia wielkoformatowa Felgi Aluminiowe 5x100 OLIMP Creatine