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.

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
    
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
1  
Please update the question with the appropriate code that outputs the sidebar. –  Scott Helme Nov 14 '13 at 20:46
show 5 more comments

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

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

2 Answers

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
add comment
up vote -1 down vote accepted

i change body-right css

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

share|improve this answer
add comment

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.