Is there a way to add a non-breaking space to CartoDB legends or info windows?

For instance, I have the following legend:

enter image description here

But now I would like to add some spaces to that legend. I used the following approach:

<div class='cartodb-legend choropleth'> 
  <div class="legend-title">Hello &nbsp StackExchange</div>
  <p>Just adding &nbsp &nbsp &nbsp some text... </p>
    <li class="min">

As you can see the &nbsp is highlighted in the code:

enter image description here

But it somehow is not translated, and shows up like this:

enter image description here

1 Answer 1


Just add ";" at the end:

<div class='cartodb-legend custom'> 
<div class="legend-title">this is &nbsp; &nbsp; &nbsp; &nbsp;   my     title</div>




  • Of course... one of the things I always forget! May 11, 2015 at 13:07
  • I am also trying to use <i> or <em>. Neither seem to work. Is this not supported or am I missing a little detail as well? May 11, 2015 at 13:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.