1

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>
<ul>
  <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

2

Just add ";" at the end:

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

Spaces

PS:

HELP

2
  • Of course... one of the things I always forget! Commented 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? Commented May 11, 2015 at 13:09

Your Answer

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

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