I'm trying to write some HTML code to help a friend with their website. I'm self-taught, and not even remotely close to an expert by any means. I'd be most grateful for any assistance that anyone might care to offer.

OK... I have written the code for a very basic 3 x 3, 9-cell TABLE as follows:

 <!-- table width="1440" height="900" -->
 <tr width="1440" height="50"> 
     <td width="100">&nbsp;</td>
     <td width="1240">&nbsp;</td>
     <td width="100">&nbsp;</td>
 </tr>
 <tr width="1440" height="800"> 
     <td width="100">&nbsp;</td>
     <td width="1240">&nbsp;</td>
     <td width="100">&nbsp;</td>
 </tr>
 <tr width="1440" height="50"> 
     <td width="100">&nbsp;</td>
     <td width="1240">&nbsp;</td>
     <td width="100">&nbsp;</td>
 </tr>

What I am trying to accomplish is to turn the center cell (the 2nd of the 2nd ) into a frame in which I can display an HTML document titled "XYZ.html".

Now, there are a couple of specifications:

1). I need the cell/frame to maintain it's original size of 1240W x 800H. Can I use the tag with the 'noresize="noresize"' attribute?

2). I need vertical scrolling (up/down) but do not want horizontal (left/right) scrolling. Is there a way to have the text

from document "XYZ.html" wrap within the confines of the cell/frame without having to use the
tag at the end of every single line of text in the "XYZ.html" document?

3). What about the <!doctype> for the "XYZ.html" document. I understand the concept of it, but do not have any idea how to do it, or even if I need to do it. I think I'm using HTML 4.01.

4). Can I set the background color of the cell/frame to be opaque. I want the beautiful background image to still be visible, even when scrolling. I'd really hate to ruin it.

I would be most grateful for any and all assistance anyone can give me. It is my sincerest hope that someone will read this and say "Oh, easiest thing in the world. Just do this..."

I'll keep my fingers crossed!

Thanks

  • Crikey - the black arts of the table and the frame together! Rich Bradshaw 11 months ago

2 answers

danwellman 3775
2
points

1) Use an iframe instead of a standard frame and give it a specific width and height with CSS. You shouldn't need to use the noresize attribute.

2) Do you have control over the documents that will be loaded into the iframe? If so use the CSS overflow:auto on the iframe and in the pages that are to be loaded into it, set a width of less than the width of the iframe. If you don't have control over the pages, you could run into problems, as you can only set a single axis of scroll in IE. The size you have specified for the width is quite wide, only users with very high screen resolutions will see the page (the whole page, not just the iframe) without having a horizontal scrollbar.

3) Definitely use a DOCTYPE as this wil ltrigger standards mode in any browsers that view the page. Without standards mode many rendering bugs will be introduced. As you're using an iframe, you'll need to use the frame DOCTYPE:

  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"  "http://www.w3.org/TR/html4/frameset.dtd">

4) You can set the opacity of the iframe, but you'll need to use a few different CSS rules to cover each browser, use the following CSS:

opacity: 0.5;
-ms-filter: "alpha(opacity=50)";
filter: alpha(opacity=50);
Answered 11 months ago by danwellman
elena 56
1
point

For a really good look at DOCTYPE see this article: http://www.alistapart.com/articles/doctype/

If you're really interested in the business, I'd suggest checking out this text: Designing with Web Standards, by the same guy that wrote that article - the guy understands this stuff better than just about anyone.

I reckon it's an industry must-read and taught me everything I know and understand about compliance, the mysterious DOCTYPE and all kinds history about how web design came about, it's really cool.

Answered 11 months ago by elena
Log in to post your answer