I use the tag cloud widget on my site. I have some tags which consist of more than one word, like 'free will'. In the tag cloud, there sometimes comes a line break in those tags, between the words:

enter image description here

How can I make that this doesn't happen? I thought of adding display:inline-block; to the style of the tags, but there is no general tag class or something like that. Can I add a class to all tags (and if so how?) or is there an other way to do this (and if so what way?)

1 Answer 1


Try this in your CSS (untested, but should work in theory)

.tagcloud a {
white-space: nowrap;
  • This answer was "flagged as low-quality because of its length and content", which I am sure you don't want. Please try to provide some explanation along with your answer to avoid that.
    – s_ha_dum
    Commented Feb 27, 2013 at 23:11
  • There really isn't anything more to add. Penalizing conciseness is rather an odd policy.
    – vancoder
    Commented Feb 27, 2013 at 23:23
  • Concise isn't the point. I can look at code in several languages and work out what it is doing, but the person asking the question likely cannot-- hence the question. The idea is to provide reaonably complete answers to questions, not just raw code dumps.
    – s_ha_dum
    Commented Feb 27, 2013 at 23:41
  • Sorry, I missed the notification of this answer. Works like a charm, thanks!
    – user26607
    Commented Feb 28, 2013 at 21:00

Your Answer

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