Web Analytics Made Easy -
StatCounter Wrapping text in Table of Contents - CodingForum

Announcement

Collapse
No announcement yet.

Wrapping text in Table of Contents

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Wrapping text in Table of Contents

    I am building an e-learning lesson in Lectora that will be deployed to a SCROM compatible learning management system. The lesson is converted into HTML before that happens. My table of contents is around 100 pixels wide but some of the page names are longer than that and do not display fully when viewed in a browser.

    What I am trying to do is this:

    The page name for this page is very, very long and I can't see it all. Blah blah

    Would become

    The page name for this page is very,
    very long and I can't see it all. Blah blah

    I've been led to believe there is javascript that will do that.

  • #2
    Try one or the other of these two possible solutions.

    Note, there is no JS used in this particular solution...
    Code:
    <!DOC HTML>
    <html>
    <head>
    <title> Untitled </title>
    <!-- From: http://www.codingforum.net/newreply.php?do=postreply&t=237333 -->
    <style type="text/css">
    #TOC  { width:100px; border:1px solid blue; }
    #TOC2 { width:120px; height:120px; overflow:scroll; border:1px solid blue; }
    </style>
    
    </head>
    <body>
    <div id="TOC">
    The page name for this page is very, very long and I can't see it all. Blah blah
    </div>
    <p>
    You could also do it in a scrolling &lt;div&gt; region.
    <div id="TOC2">
    The page name for this page is very, very long and I can't see it all. Blah blah
    <br>
    <em>I have added some extra text that can only be seen if you scroll the area.</em>
    </div>
    
    </body>
    </html>

    Comment

    Working...
    X
    😀
    🥰
    🤢
    😎
    😡
    👍
    👎