Question

I am not a css/html expert so I'm sorry if I can not explain the problem properly.

I have 2 Wordpress sites with different themes, and I used same widget for them to show the tags. In 1st site, let's name it A, the tags go after another in the same line, even if a tag must be break. In the 2nd site, B, tags go after another too, but in case of all words of a tag can't be at the same line, this tag would go to next line.

UPDATE: What I got in B is like this:

first tag

very large second tag

But in A I got this:

first tag very large

second tag

These tags are different elements, each of which consists of a and span.

This makes white gaps in tag cloud which I don't like. I tried to inspect two themes css via firefox and compare them to identify what to do, but couldn't find the reason. I made any difference in A in B via firefox inspect element but it didn't work.

I put all css codes which firefox gives for the element div#tag-groups-cloud-tabs... in both sites below:

for site A:

inline 139:
*::-moz-selection {
    background: none repeat scroll 0% 0% rgb(73, 138, 184);
}

style.css 137:
*::-moz-selection {
    background: none repeat scroll 0% 0% rgb(73, 138, 184);
    color: rgb(255, 255, 255);
}

inline:
element {
}

style.css 40:
*, html, body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, label, fieldset, input, p, blockquote, th, td {
    margin: 0px;
    padding: 0px;
    outline: 0px none;
    vertical-align: baseline;
    background: none repeat scroll 0% 0% transparent;
}

style.css 104:
* {
    outline: medium none;
}

style.css 197:
body {
    font: 13px/20px tahoma,'PT Sans',Arial,Helvetica,sans-serif;
    color: rgb(67, 67, 67);
}

and for site B:

style.css 470:
*::-moz-selection {
    background: none repeat scroll 0% 0% rgb(36, 137, 13);
    color: rgb(255, 255, 255);
    text-shadow: none;
}

style.css 758:
.footer-sidebar:after, .hentry:after, .slider-direction-nav:after, .contributor-info:after, .search-box:after, [class*="content"]:after, [class*="site"]:after {
    clear: both;
}

style.css 740:
.footer-sidebar:before, .footer-sidebar:after, .hentry:before, .hentry:after, .slider-direction-nav:before, .slider-direction-nav:after, .contributor-info:before, .contributor-info:after, .search-box:before, .search-box:after, [class*="content"]:before, [class*="content"]:after, [class*="site"]:before, [class*="site"]:after {
    content: "";
    display: table;
}

inline:
element {
}

rtl.css 34:
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
    border: 0px none;
    font-family: Tahoma;
    font-size: 100%;
    font-style: inherit;
    font-weight: inherit;
    margin: 0px;
    outline: 0px none;
    padding: 0px;
    vertical-align: baseline;
}

style.css 64:
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
    border: 0px none;
    font-family: inherit;
    font-size: 100%;
    font-style: inherit;
    font-weight: inherit;
    margin: 0px;
    outline: 0px none;
    padding: 0px;
    vertical-align: baseline;
}

style.css 2073:
.widget {
    font-size: 14px;
    -moz-hyphens: auto;
    line-height: 1.28571;
    word-wrap: break-word;
}

style.css 2055:
.content-sidebar {
    color: rgb(118, 118, 118);
}

rtl.css 121:
body, button, input, select, textarea {
    color: rgb(43, 43, 43);
    font-family: Tahoma;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
}

rtl.css 101:
body {
    direction: rtl;
}

style.css 102:
body, button, input, select, textarea {
    color: rgb(43, 43, 43);
    font-family: Lato,sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
}

No correct solution

OTHER TIPS

for one line statement use white-space:nowrap;

see demo here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top