I’m making a site right now and I’m using iframes just so that a large body of text would not take up so much space. The thing is, I don’t know how to add an iframe to a page without having to make another html page of the iframe’s text for the iframe to call on. I’m dealing with quite a few files here and I don’t want to have to end up with double the amount of html files just because of iframes.
Can anyone help me out? Sorry for the uninteresting GQ question, but I’d really appreciate any help!
No - iFrame is a frame element, and therefore all it can reference is another HTML file (you can’t even make self-referential iFrames either - I’ve tried).
If it’s just text, why not go for
<TEXTAREA cols=X rows=Y>The text you want here.</TEXTAREA>
This will automatically insert a scrollbar if needed.
If you don’t want the text to be editable, use an onFocus=javascript:blur(); element in your leading textarea tag. You can also use style tags to change the font.
That’s perfect! Thank you so much! All I need is to change the font, make the textarea transparent, and modify the scrollbar (I can do all those, right?) and it’s all set!
I’m not trying to tell you what to do, and I’m by no means dissing the advice of ZipperJJ and jjimm, but I think you should know that all those scrollbar properties are not valid CSS2, so your code won’t validate if you use them. I think they’re specific to IE.