...

View Full Version : Wrapping text in Table of Contents



ThomB
09-07-2011, 07:06 PM
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.

jmrker
09-08-2011, 04:59 AM
Try one or the other of these two possible solutions. :thumbsup:

Note, there is no JS used in this particular solution...:o


<!DOC HTML>
<html>
<head>
<title> Untitled </title>
<!-- From: http://www.codingforums.com/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>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum