WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

in wordpress template sidebar and recent posts or recent comments blocks:

when title has more than 30 characters new line created and its not good display

you can see this image for understand what i say:

style for side bar ul li is :

#body-right ul li a {
  background: url("../images/blog-point1.png") no-repeat scroll 8px center rgba(0, 0, 0, 0);
  color: #45484A;
  display: block;
  font: 13px/28px 'OpenSansRegular',Arial,sans-serif;
  padding-left: 22px;
  text-decoration: none;

sidebar style:
#body-right ul li {
  background: url("../images/blog-body-right-line.png") no-repeat scroll center bottom rgba(0, 0, 0, 0);
  direction: rtl;
  height: 28px;
  line-height: 28px;
  list-style: none outside none;
  text-align: right;

So how can i solve this problem?

share|improve this question

migrated from stackoverflow.com Nov 15 '13 at 5:55

This question came from our site for professional and enthusiast programmers.

This is a better question for WordPress Development. – Matt Ball Nov 14 '13 at 17:36
@MattBall Thanks for edit and image but i need 10 rep to use image – MinA Nov 14 '13 at 17:46
@MattBall how can i move this question to wordpress section – MinA Nov 14 '13 at 17:48
Simplest way: delete this question and re-ask over there. – Matt Ball Nov 14 '13 at 17:52
Please update the question with the appropriate code that outputs the sidebar. – Scott Helme Nov 14 '13 at 20:46

You can use the PHP substr function but you have to think that there is no regular text string like that, you should try with some loren ipsum simulator to do that

share|improve this answer
up vote -1 down vote accepted

i change body-right css

height:28px; to min-height:28px; and problem solved

share|improve this answer

Your Answer


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.