Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
css1 [2009-09-03 10:11] Joakim Forsgren |
css1 [2009-09-03 10:17] Joakim Forsgren |
||
---|---|---|---|
Line 2: | Line 2: | ||
När en webläsare läser in en CSS så kommer den att formatera dokumentet efter CSS:n. | När en webläsare läser in en CSS så kommer den att formatera dokumentet efter CSS:n. | ||
- | Det finns tre sätt att lägga in CSS\\ | + | Det finns tre sätt att lägga in en CSS\\ |
Extern - External Style Sheet\\ | Extern - External Style Sheet\\ | ||
Intern - Internal Style Sheet\\ | Intern - Internal Style Sheet\\ | ||
Line 85: | Line 85: | ||
font-size: | font-size: | ||
- | The color is inherited from the external style sheet and the text-alignment and the font-size is replaced by the internal style sheet. | + | 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 === | === Multiple Styles Will Cascade into One === | ||
- Browser default | - Browser default | ||
- | - External style sheet | + | - External style sheet, in read order |
- Internal style sheet (in the head section) | - Internal style sheet (in the head section) | ||
- Inline style (inside an HTML element) | - Inline style (inside an HTML element) | ||
So, an inline style (inside an HTML element) has the highest priority, which means that it will override a style defined inside the < | So, an inline style (inside an HTML element) has the highest priority, which means that it will override a style defined inside the < | ||
- | |||
- |