Multiple Style Sheets
If some properties have been set for the same selector in different style sheets, the values will be inherited from the more specific style sheet.
For example, an external style sheet has these properties for the h3 selector:
h3
{
color:red;
text-align:left;
font-size:8pt;
}
{
color:red;
text-align:left;
font-size:8pt;
}
And an internal style sheet has these properties for the h3 selector:
h3
{
text-align:right;
font-size:20pt;
}
{
text-align:right;
font-size:20pt;
}
If the page with the internal style sheet also links to the external style sheet the properties for h3 will be:
color:red;
text-align:right;
font-size:20pt;
text-align:right;
font-size:20pt;
The color is inherited from the external style sheet and the text-alignment and the font-size is replaced by the internal style sheet.
Multiple Styles Will Cascade into One
Styles can be specified:
- inside an HTML element
- inside the head section of an HTML page
- in an external CSS file
Tip: Even multiple external style sheets can be referenced inside a single HTML document.
Other Topics
CSS : Background-shortand property,CSS : Background image,CSS : Background color,CSS : Cascading order,CSS : Multiple style sheets,CSS : Inline styles,CSS : Internal style sheet,CSS : External style sheet,CSS : Class selector,CSS : Sticky Footer Layout,CSS : Collapse borders,CSS : List,CSS : Background color,CSS : Styling links,CSS : Padding properties,CSS : Padding-shorthand property,CSS : The lang pseudo class,CSS : MEDIA,CSS::STYLING FORMS, mechanical Engineering, English books,Photoshop tutorials,Harry potter,Best 100 english books,Mechanical-old-question-paper,CSS : Id Selector
No comments:
Post a Comment