|
expanding table problems
|
| exe_work |
Posted on 22-04-2011 14:24
|

Junior Member

Posts: 16
Joined: 21/03/2011
|
Hello,
Creating new theme I encountered with weird problem:
i created theme structure, it looks like this:

The theme.php and Style.css code I include later on this msg. anyway it works perfectly however, the problem is then I try to type long continues text or long weblink (for example : abcabcabc... or http://www.php-fu...111111.... ) in forum, news, custom pages etc if that text reaches the width limit of the forum table, news table (in this case it's 623px), it still keeps expanding in the same line instead of autotransfering into new line. So it looks like this:

Could someone help me to find where is that mistake and correct it : ) I tryed myself however I haven't found it yet
Edited by exe_work on 23-04-2011 09:26
|
| |
|
|
| smokeman |
Posted on 22-04-2011 14:38
|

Veteran Member

Posts: 960
Joined: 23/06/2006
|
Hi.
I can't really test it self without the complete theme-files/images - but try with this attached theme.php
|
| |
|
|
| GMUDuckman |
Posted on 22-04-2011 15:00
|

Senior Member

Posts: 267
Joined: 06/07/2010
|
you can try the following for that div's css
word-wrap: break-word;
but you have to make sure white-space: normal;
if you have white-space: nowrap;
then the above won't work
css3 supports the followingword-break:hyphenate;
where it will actually hyphenate a broken word.
i know css3 isn't supported in alot of browsers... i think word-wrap: break-word is though |
| |
|
|
| exe_work |
Posted on 22-04-2011 15:00
|

Junior Member

Posts: 16
Joined: 21/03/2011
|
Smokeman thx for trying to bad that wouldn't helped :/
well I could send you personally all files via msg, if you think that it can help for investigation.
At the moment trying "GMUDuckman" suggestion 
GMUDuckman, that line "white-space: normal; word-wrap: break-word;" i have to use in theme.php continent place, or in style.css ?
Edited by exe_work on 22-04-2011 15:06
|
| |
|
|
| GMUDuckman |
Posted on 22-04-2011 16:19
|

Senior Member

Posts: 267
Joined: 06/07/2010
|
your theme's style css. i think it has to go in the
.main-body
to cover news and articles
.forum_thread_user_post
to cover forum posts.
you may have to play around with it though. |
| |
|
|
| exe_work |
Posted on 22-04-2011 16:42
|

Junior Member

Posts: 16
Joined: 21/03/2011
|
Yeah, tryed to created on style.css added white-space: normal;
word-wrap: break-word; to .main-body { } and created new ..forum_thread_user_post { white-space: normal;
word-wrap: break-word; } , but it still doesn't work.. it's like some kind of mistery..  |
| |
|
|
| GMUDuckman |
Posted on 22-04-2011 17:07
|

Senior Member

Posts: 267
Joined: 06/07/2010
|
you can try this
http://www.css3.c...ord-break/
but that only works in css3 |
| |
|
|
| exe_work |
Posted on 22-04-2011 17:46
|

Junior Member

Posts: 16
Joined: 21/03/2011
|
I think i found the solution. In viewthread.php line~267 Codeecho nl2br($message);
i change to Code$message = wordwrap($message,60, "n", true);
echo "<div class='post_message' >";
echo nl2br($message);
echo "</div>";
, and finaly it works ! :) case closed. Thx for support guys. (60 is the letter count, it can be change to your needs) |
| |
|
|
| Mangee |
Posted on 22-04-2011 18:06
|

Senior Member

Posts: 247
Joined: 19/07/2008
|
I just put a large line of " a " on the new theme Modern10 on 7.02.00 and there is no word wrap.
It just truncates the line. This was in a news article on home page.
I then tried Gillette on 7.01.05 and it just pushed the right side off the screen.
Same problem ????
|
| |
|
|
| exe_work |
Posted on 22-04-2011 19:52
|

Junior Member

Posts: 16
Joined: 21/03/2011
|
Mangee, i used it only for forum msg! :) (I already tested on few themes running 7.01.5 fusion)
Yet i didn't try to investigate solution for news and artickles so far :) ..
Anyway after longer test i saw that Code$message = wordwrap($message,60, "n", true);
echo "<div class='post_message' >";
echo nl2br($message);
echo "</div>";
cuts not only simple too long words like "aaaaaaaaae..." but smiles, font , img codes too ;/ after that smiles, font effects on msg is displayed as a simple text ;/ (style='vertical-align:middle;' /> src='../images/smiley/frown.gif' alt='Frown'
style='vertical-align:middle;' />
so for this code needs an upgrade. Maybe someone could help to include for this code Code$message = wordwrap($message,60, "n", true);
echo "<div class='post_message' >";
echo nl2br($message);
echo "</div>";
an exeptions "http://yoursite/" and "www.yoursite" "src='../images/smiley/frown.gif'" (i think then img, scr, and smiles, should be displayed :) )
Edited by exe_work on 22-04-2011 20:22
|
| |
|
|
| Mangee |
Posted on 22-04-2011 22:49
|

Senior Member

Posts: 247
Joined: 19/07/2008
|
Doing some searching CSS 2.1 does not have a fix for very long words to cause them to wrap at the end of content area except for a few browsers and that depends on version.
Most info points to a server side code fix, example
http://stackoverf...ext-in-css
look for " insert the shy-hyphens " or " javascript " .
Next wait for full browser support of CSS3 http://www.w3.org...#word-wrap.
Info for exe_work. Most of the changes you made to Gillette aren't needed. Look at http://fusionfusi...t/news.php and pick Gillette. A div wrapper and some small code changes gets your sizes of panels. You could even code a tableless theme like Atlantis to do the same.
Edited by Mangee on 22-04-2011 23:05
|
| |
|