Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?)

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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

.tagcloud a {
white-space: nowrap;
}
share|improve this answer
    
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 Feb 27 '13 at 23:11
    
There really isn't anything more to add. Penalizing conciseness is rather an odd policy. –  vancoder Feb 27 '13 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 Feb 27 '13 at 23:41
    
Sorry, I missed the notification of this answer. Works like a charm, thanks! –  Camil Staps Feb 28 '13 at 21:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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