Jump to content

Need help breaking lines


rain13

Recommended Posts

Hello.

 

I have problem with syntax highlighter - it doesn't break lines. If your browser window is too narrow the lines will go out of window and cause horizontal scrollbars to appear which I don't want.Here's my problematic post:http://autoit.net.ee/pub/?id=152 (pay attention to 39th line)I have no ideas what to try next. I want to break lines but none of what I've tried so far works.

.syntaxhighlighter table td.code .line {    white-space: pre-wrap !important;    word-wrap: break-word !important;    white-space: pre-wrap;       /* css-3 */    white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */    white-space: -pre-wrap;      /* Opera 4-6 */    white-space: -o-pre-wrap;    /* Opera 7 */    word-wrap: break-word;       /* Internet Explorer 5.5+ */}
Link to comment
Share on other sites

Thanks.

 

It worked but when I googled how to make syntaxhighlighter to wrap lines I found instructions that told me to

.syntaxhighlighter table td.code .line {    white-space: pre-wrap !important;    word-wrap: break-word !important;}

Why didn't this work?Now it breaks line numbering and I tried javascript suggested here, but it didn't work.http://stackoverflow.com/questions/6286733/automatic-line-break-in-js-syntaxhighlighter

Link to comment
Share on other sites

No no no! I think you should try using if others don't work:

selector

{

wb

}

fill the rest. yourself

Link to comment
Share on other sites

You want

<div class="line number39 index38 alt2">39</div>

to expand when code stacks as it is still line number 39, so you need something similar to

<div class="line number39 index38 alt2">39<div class="line number39 index38 alt2"><code class="au3 spaces">                        </code><code class="au3 functions">FileCopy</code><code class="au3 plain">(</code><code class="au3 variable">$ssrc</code><code class="au3 plain">& </code><code class="au3 string">""</code> <code class="au3 plain">& </code><code class="au3 functions">StringTrimRight</code><code class="au3 plain">(</code><code class="au3 variable">$arr</code><code class="au3 plain">[</code><code class="au3 variable">$i</code><code class="au3 plain">],4) & </code><code class="au3 string">".nef"</code><code class="au3 plain">,</code><code class="au3 variable">$sdst</code><code class="au3 plain">& </code><code class="au3 string">""</code> <code class="au3 plain">&</code><code class="au3 functions">StringTrimRight</code><code class="au3 plain">(</code><code class="au3 variable">$arr</code><code class="au3 plain">[</code><code class="au3 variable">$i</code><code class="au3 plain">],4) & </code><code class="au3 string">".nef"</code><code class="au3 plain">,8)</code></div></div>
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...