Help - Search - Members - Calendar
Full Version: scroll box?
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
balthasar
Hey I wanted to help my friend out with some html over the internet and I was wondering if someone could tell me how to place the codes inside a sroll box without the html functioning as html, if you know what I mean. thanks!
Darin McGrew
Please see the FAQ entry How can I show HTML examples without them being interpreted as part of my document?
balthasar
that helps, thanks. But is there any way to indicate a big section of text so that it's not interpreted? Say if I wanted to post a whole layout, it would be rather hard to go through and replace everything.
Peter1968
One way I can think of off the top of my head would be to embed the markup you want to illustrate inside an iframe and have the server deliver it as text/plain.

I guarantee you there are more elegant methods, but that's one I can think of.

Darin McGrew
QUOTE(Peter1968 @ Feb 26 2007, 01:28 PM) *
One way I can think of off the top of my head would be to embed the markup you want to illustrate inside an iframe and have the server deliver it as text/plain.
Except that a certain browser-like OS component is likely to interpret it as text/html anyway.

Another option is to post a sample document, and let them View Source if they want to copy the source.

Another option is to create a simple script to do the conversion for you.
Peter1968
QUOTE(Darin McGrew @ Feb 27 2007, 08:34 AM) *
Except that a certain browser-like OS component is likely to interpret it as text/html anyway.


Yep, you're right.

Example

IE 7.0 insists on marking up the plain text content of the iframe. Firefox and Opera get it right, of course. So much for that idea...

Actually, IE 7.0 inists on word-wrapping the text in the frame as well. How nice of it to do that, though it shouldn't.
Christian J
QUOTE(Peter1968 @ Feb 27 2007, 01:11 AM) *

QUOTE(Darin McGrew @ Feb 27 2007, 08:34 AM) *
Except that a certain browser-like OS component is likely to interpret it as text/html anyway.


Yep, you're right.

Example

IE 7.0 insists on marking up the plain text content of the iframe. Firefox and Opera get it right, of course. So much for that idea...

Actually, IE 7.0 inists on word-wrapping the text in the frame as well. How nice of it to do that, though it shouldn't.

My IE6 got it right, but displayed a security warning that the "file content didn't match its security information". wub.gif
Dr Z
Another quick way ma be is to use the "Find/Replace" function of your text editor. Even Notepad has this capability. Using Notepad as an example. you would do the following:

Find what: <
Replace with: &lt;
And hit the "Replace All" botton

You would repeat it for >/&gt;

Only two actions per page.
Darin McGrew
Note that you need to replace & with &amp; first, and then replace < with &lt; (as the FAQ I cited earlier explains).
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.