Professional Documents
Culture Documents
Outline
In the previous lecture
We discussed construction of individual style rules.
Creating Style-rule Selectors…
Which allow us to apply styles with pin-point accuracy.
<style type=“text/css”>
@import “not_for_Netscape4.css”;
…style rules…
</style>
Here, “not_for_Netscape4.css” is the filename of your sheet (your choice).
This can also be written: @import url(“external.css”).
Since Netscape4 doesn’t support @import, it hides the sheet…
Note the absence of an = sign, and the presence of a semicolon ( ; ) .
Notes:
Style sheets imported later take precedence over earlier ones.
Style sheets may also be imported to external style sheets.
Applying Styles Locally
Styles may also be applied to individual XHTML tags:
To target a single tag, just use the style attribute: