NulledBB, how'd you do this

by Noah - 09-11-2015, 09:26 PM
Member
Prime
Posts:
136
Joined:
Aug 2015
Likes:
9
Credits:
7
Reputation:
29
2 Years of Service
#1
OP
Posted: 09-11-2015, 09:26 PM
[Image: xHrXmii.png]

I am trying to get my line to break after a certain number of letters like you have in your sidebar, I am used to IPB so when I moved over to Mybb I noticed that it did not automatically break your words after a certain length, so how could I go about to doing this. Thank you in advance
@Believer rocks
Paradigm
Posts:
1,332
Joined:
May 2015
Likes:
49
Credits:
12
Reputation:
50
2 Years of Service
#2
Posted: 09-11-2015, 09:36 PM
You can do that with CSS Smile
Member
Prime
Posts:
136
Joined:
Aug 2015
Likes:
9
Credits:
7
Reputation:
29
2 Years of Service
#3
OP
Posted: 09-11-2015, 09:59 PM
(09-11-2015, 09:36 PM)Kill Wrote: You can do that with CSS Smile

Please explain
oldfag
Posts:
5,764
Joined:
Jan 2015
Likes:
1,572
Credits:
17,490
Reputation:
237
3 Years of Service
#4
Posted: 09-11-2015, 10:03 PM
Code:
word-break: break-word;

Send me a message for help. (Read the help docs first)
Steam Wishlist - Anime Watchlist
لا إله إلا الله‎
Posts:
6,343
Joined:
Jan 2015
Likes:
313
Credits:
28
Reputation:
168
3 Years of Service
#5
Posted: 09-11-2015, 11:23 PM (This post was last modified: 09-11-2015, 11:25 PM by linkzy.)
PHP

$string = substr($string,0,20).'...';

n of course

word-break: break-word;


after 20 letters itll put .... infront
| A- Best forever .. | Legend - ;) | Addicted | Senpai | sad | Sensei | H | fdigl |
[Image: gZD4Fba.png]

Kill
10-11-2015, 12:50 PM
Lucidious
09-11-2015, 11:25 PM
Member
Prime
Posts:
136
Joined:
Aug 2015
Likes:
9
Credits:
7
Reputation:
29
2 Years of Service
#6
OP
Posted: 10-11-2015, 11:37 AM
(09-11-2015, 11:23 PM)Believer Wrote: PHP

$string = substr($string,0,20).'...';

n of course

word-break: break-word;


after 20 letters itll put .... infront

Thank you, I already knew about word-break but that was not it so eventually I asked a friend for help and he sent me a very similar code to yours and now it works, thank you for elaborating!
لا إله إلا الله‎
Posts:
6,343
Joined:
Jan 2015
Likes:
313
Credits:
28
Reputation:
168
3 Years of Service
#7
Posted: 10-11-2015, 03:42 PM
(10-11-2015, 11:37 AM)Noah Wrote:
(09-11-2015, 11:23 PM)Believer Wrote: PHP

$string = substr($string,0,20).'...';

n of course

word-break: break-word;


after 20 letters itll put .... infront

Thank you, I already knew about word-break but that was not it so eventually I asked a friend for help and he sent me a very similar code to yours and now it works, thank you for elaborating!

You are welcome mate. Enjoy
| A- Best forever .. | Legend - ;) | Addicted | Senpai | sad | Sensei | H | fdigl |
[Image: gZD4Fba.png]

The last reply on this thread is older than a month. Please do not unnecessarily bump it.
Register an account or login to reply
Create an account
Create a free account today and start posting right away. It only takes a few seconds.
Login
Log into an existing account.
1 Guest(s)