Wrapping IFRAMES

liunx

Guest
I have an IFRAME in my page, however I want to wrap the text in it. How do I do this?

ThanksNormally the text in an iframe will auto wrap when the text doesn't fit on one row, just like on a normal page.

If it's not doing that it's becuse you have done something to prevent it wraping normally.

To know what that is however requires that you leave a link to your site.I have included the script. You need to open EDITOR.HTML and see the IFRAME. ThanksOk, this is considerably more complex then you first description of your page.

You are not loading an iframe, you seem to be trying to make webbased editor and the code is prettyu banged up.

For starters, this is what your iframe looks like

<font size="2" face="Verdana, Helvetica"></font>

That is VERY far from how a HTML page should look like, which is something like this

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
</head>
<body>

</body>
</html>

However are you sure you are not really looking for the <textarea> tag instead of an <iframe> ?

Also your JavaScript is broken and only works on IE.Of course it will only work in IE. It uses DOM.

Anyway I use an IFRAME because it can be used to display HTML and is what you are told to do when you create a content manager.

Thanks anywayOriginally posted by ollmorris
Of course it will only work in IE. It uses DOM.


JFYI

DOM = Document Object Model of which there is a perfectly fine standards crossbrowser version.
<!-- m --><a class="postlink" href="http://www.w3.org/DOM/">http://www.w3.org/DOM/</a><!-- m -->

Apart from that one there is an old IE proprietary format just as there are other old proprietary format for eg NS 4.x.

In short, all JS browsers have a DOM of some sort.
If you can't get your JS to work in Netscape 6+ it's generally becuse you are stuck in the late 1990-ies coding with a browserspecific proprietary DOM instead of a modern one that works crossbrowser.


In any case, your page linebreaks just fine in IE 6.01 when I tried it.
However it will only linebreak if there actually IS somewhere to linebreak (that means a space). If you have 200 chars in one row and no space the row will be minimum 200 chars long.

The reason i suggested textarea before is that IE has a special property in were it actually makes linebreaks even in compact (no space) text if entered in textareas.
 
Top