Nbsp in style

From Wikipedia!
Jump to navigation Jump to search

Broken because of spaces[edit]

<div style="background : green ; border : 1px solid red">
Foo!
</div>
gives

Foo!

main:

Workaround[edit]

<div style="background: green; border: 1px solid red">
Foo!
</div>
gives

Foo!

Broken because of parser function[edit]

(See also Newline through parser functions.)

<div style="background: green{{#if: Foo|; border: 1px solid red}}">
Foo!
</div>
gives

Foo!

Workaround[edit]

<div style="background: green; {{#if: Foo|border: 1px solid red}}">
Foo!
</div>
gives

Foo!