Replace inline styles with CSS

Heitor Helmer Herzog
1 min readAug 6, 2017

--

We often think of built-in styles as a way to replace the styles we assemble. In some cases this is the case, and it is very useful. But there are some circumstances in which you need to do otherwise.

We can replace inline styles directly from the stylesheet. See this example:

HTML

<div style="background: red;"> The inline styles for this div should make it red</div>

--

--

Heitor Helmer Herzog
Heitor Helmer Herzog

Written by Heitor Helmer Herzog

Software developer, In love with games and the industry. Let’s code! About me: www.linkedin.com/in/heitorhherzog

No responses yet