问题描述:

I am almost done with my website but I got one more issue.

My headers have to look like this: http://puu.sh/imtaC/1de833f93b.png

But sadly it gives an error..

Element blue not allowed as child of element div in this context. (Suppressing further errors from this subtree.)

This is my HTML code:

<img src="images/icon-small.png" class="small-modal" alt="Small Icon"/> <blue>S</blue>t<blue>3</blue>fan<blue>[</blue>NL<blue>]</blue> - <blue>A</blue>bout

This is my CSS code:

blue{

color: #2793cd;

font-family: "Exo", Arial, Helvetica, sans-serif;

font-weight: normal;

font-size: 18px;

}

网友答案:

Instead of using custom tags, just use span tags and class them appropriately.

Like so:

HTML

<span class="blue">S</span>t<span class="blue">3</span>fan<span class="blue">[</span>NL<span class="blue">]</span> - <span class="blue">A</span>bout

CSS

.blue{
    color: #2793cd;
    font-family: "Exo", Arial, Helvetica, sans-serif;
    font-weight: normal;
    font-size: 18px;
}

Fiddle: http://jsfiddle.net/2p3sdrk3/

相关阅读:
Top