Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
It’s not unusual for more than one style rule to apply to the same element, particularly on larger sites that require more effort to manage the CSS. As mentioned in “The Cascade: When Rules Collide” in Chapter 7, a style’s location can break a tie in the contest between inheritance and specificity. The basic rule is that, with all else equal, the later the style appears, the more precedence or importance it has ( through
).
In this example, the style element comes last. Therefore, its rules will have precedence over the rules in the base.css style sheet (as long as the conflicting rules have the same inheritance and specificity factors).
...
<head>
<title>El Palau de la Música</title>
<link rel="stylesheet" href="base.css" />
<style>
img {
border-style: dashed;
}
</style>
</head>
...