I was looking at changing the infoWindow close button color -

a href="#close" class="cartodb-popup-close-button close" style="background-color: #000; font-color: #000;">x

The 'background-color' works but every attempt at changing the color of the 'x' has failed. I was thinking the x might be a font but doesn't seem to be. font-color doesn't change anything.

Any thoughts?


Inspecting the source shows it's definitely a text "x", but it looks like the CartoDB editor has it in a :before pseudo-class that you're not going to be able to style inline.

But it looks like you're trying to hide the button (you have the background and font both set to black) so you could just take out that whole a href line. That would have the side effect of making the infowindow impossible to close, though...

| improve this answer | |

As long as you leave the close class the close mechanism will work. You can change the defaults styles by removing cartodb-popup-close-button class, but then you would have to define the styles inline yourself to position it too, e.g.:

<a href="#close" class="close" style="position:absolute;top: -12px; right: -12px; width: 20px; height: 20px; background: #000; border-radius: 20px;">x</a>

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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