Jump to content

Truncate text in CODE and QUOTE Tags


Guest WebbyB

Recommended Posts

Hi,

I've noticed a consistant problem with forums using a fixed width.

If someone writes a line of code or a sentence without any character spacing - then it breaks the fixed width layout by spilling over the edge. This may happen aswell with text that is not wrapped in the BB Code or Quote tags.

Can you set a truncation option please for this reason in the Admin panel "Truncate joined text after x amount of characters" Amount: [ 100 ] (user definable)

Or something similar please.

Regards

:)

Link to comment
Share on other sites

Hi,



I've noticed a consistant problem with forums using a fixed width.



If someone writes a line of code or a sentence without any character spacing - then it breaks the fixed width layout by spilling over the edge. This may happen aswell with text that is not wrapped in the BB Code or Quote tags.



Can you set a truncation option please for this reason in the Admin panel "Truncate joined text after x amount of characters" Amount: [ 100 ] (user definable)



Or something similar please.



Regards



:)



There's already an option to break text after x many characters.
Link to comment
Share on other sites

Hey!

I have my truncate set at 80 (and always have done) - but it still won't break the line.

I guess it's somethign to do with the width of the codebox - though you say use codebox instead of code - That's fine for me - but how do the users do this - as when they use the text editor - they only have clickable buttons - and in doing so creates a [ code ] [/ code] - not codebox...?

How would I go about changing the css anyhoo?

Link to comment
Share on other sites

You would go into Look & Feel > Edit your Styles CSS (Advanced or easy) find the .code class and add in:
max-width: ###px;
overflow: auto;

And it should do it.

Mind you, though, if a lot of your users are still using IE6 then max-width will not work. You will also be required to add:
width: ###px;

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...