NulledBB, how'd you do this

by Noah - 09-11-2015, 08:26 PM
Member
Prime
Posts:
114
Joined:
Aug 2015
Likes:
3
Credits:
0
Reputation:
23
1 Year of Service
#1
OP
Posted: 09-11-2015, 08: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
Prime
Posts:
1,249
Joined:
May 2015
Likes:
40
Credits:
-1,092
Reputation:
34
1 Year of Service
#2
Posted: 09-11-2015, 08:36 PM
You can do that with CSS Smile
Member
Prime
Posts:
114
Joined:
Aug 2015
Likes:
3
Credits:
0
Reputation:
23
1 Year of Service
#3
OP
Posted: 09-11-2015, 08:59 PM
(09-11-2015, 08:36 PM)Kill Wrote: You can do that with CSS Smile

Please explain
dead inside
Posts:
4,990
Joined:
Jan 2015
Likes:
1,306
Credits:
18,795
Reputation:
183
Owner
2 Years of Service
#4
Posted: 09-11-2015, 09:03 PM
Code:
word-break: break-word;

Read the help documents before sending me a message.
I'm not really online on weekends, so expect delays on replies.

لا إله إلا الله‎
Posts:
6,324
Joined:
Jan 2015
Likes:
295
Credits:
184
Reputation:
158
2 Years of Service
#5
Posted: 09-11-2015, 10:23 PM (This post was last modified: 09-11-2015, 10:25 PM by linkzy.)
PHP

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

n of course

word-break: break-word;


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

Kill
10-11-2015, 11:50 AM
LucidiousXIV
09-11-2015, 10:25 PM
Member
Prime
Posts:
114
Joined:
Aug 2015
Likes:
3
Credits:
0
Reputation:
23
1 Year of Service
#6
OP
Posted: 10-11-2015, 10:37 AM
(09-11-2015, 10: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,324
Joined:
Jan 2015
Likes:
295
Credits:
184
Reputation:
158
2 Years of Service
#7
Posted: 10-11-2015, 02:42 PM
(10-11-2015, 10:37 AM)Noah Wrote:
(09-11-2015, 10: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
| Monopoly- Best forever .. | v4hl - ;) | Addicted | Senpai | Nyan | 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)