Responsive Web Design: Added hint to Override Class Declarations with Inline Styles (#21954)
Added hint to Override Class Declarations with Inline Styles (https://guide.freecodecamp.org/certifications/responsive-web-design/basic-css/override-class-declarations-with-inline-styles and https://learn.freecodecamp.org/responsive-web-design/basic-css/override-class-declarations-with-inline-styles)
This commit is contained in:
committed by
Christopher McCormack
parent
8e5e3a7db0
commit
a02030b23e
@ -3,8 +3,29 @@ title: Override Class Declarations with Inline Styles
|
||||
---
|
||||
## Override Class Declarations with Inline Styles
|
||||
|
||||
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/certifications/responsive-web-design/basic-css/override-class-declarations-with-inline-styles/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
|
||||
|
||||
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
|
||||
|
||||
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
|
||||
We need to use an ```inline style``` to try to make our ```h1``` element white.
|
||||
|
||||
### Example
|
||||
|
||||
Inline styles look like this:
|
||||
|
||||
```css
|
||||
<h1 style="color: green;">
|
||||
```
|
||||
|
||||
### Solution
|
||||
|
||||
In this line:
|
||||
|
||||
```css
|
||||
<h1 id="orange-text" class="pink-text blue-text">Hello World!</h1>
|
||||
```
|
||||
In opening tag ```<h1>``` we need to add ```inline style``` to make our ```h1``` element white:
|
||||
|
||||
```css
|
||||
<h1 style="color: white;" id="orange-text" class="pink-text blue-text">Hello World!</h1>
|
||||
```
|
||||
|
||||
#### Tip:
|
||||
An inline style loses many of the advantages of a style sheet (by mixing content with presentation). Use this method sparingly.
|
||||
|
Reference in New Issue
Block a user