April 30, 2012

Inline CSS elements don't have whitespace

Question by Falko Joseph

In my code I have this:

<p><b>Foo</b> bar</p>

But it renders as

Foobar

How do you keep whitespace before and after inline elements? I want the following result:

<p><b>Foo</b> bar</p>

Foo bar

Answer by Starx

It renders fine,

The only thing to be concerned is about extrac spaces. HTML will not render more than one spaces.

Author: Nabin Nepal (Starx)

Hello, I am Nabin Nepal and you can call me Starx. This is my blog where write about my life and my involvements. I am a Software Developer, A Cyclist and a Realist. I hope you will find my blog interesting. Follow me on Google+

...

Please fill the form - I will response as fast as I can!