|
this is from our James C. Chen of Audio Images, from our Web-Design Newsgroup, by the way...
Frame Problems in NetObjects Fusion 3.0 and NetObjects TeamFusion Client 3.0
NetObjects Fusion 3.0 allows you to create pixel perfect web pages. They achieve their pixel positioning two different ways: by using nested tables and by using a clearpixel.gif. When you add frames using NetObjects Fusion 3.0 and NetObjects TeamFusion Client 3.0, Fusion generates HTML that is not pixel perfect. There are two problems that arise when you use the AutoFrames feature. First, the margins around each frameset is set to “2” which adds two pixels around each frameset and will shift all your images two pixels. The second problem is in the main frame page which defines the columns and rows incorrectly and will cause large gaps between the framesets.
We can fix this problem by commenting out the code that NetObjects Fusion generates and by hand coding the proper HTML to make the pages pixel perfect.
Fixing the Frameset Margins
- Add this into the Layout HTML/Between Head Tags
- Add this into the Layout HTML/Beginning of Body. Open the file body_index.html in Notepad and copy the following parts of the Base target, closing head tag, and body tag. You simply need to change the margin settings from 2 to 0. What this will do is comment out the body tag that NetObjects Fusion creates and put in the new base target, closing head tag, and the new body tag with all your margins set to 0. This will fix the 2 pixel problem for the layout portion of the page in Fusion or the body frameset in your browser.
|
--> <BASE TARGET="_parent"> </HEAD> <BODY BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#990000" TEXT="#000000"TOPMARGIN=0 LEFTMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0> (this last bit is all one line)
|
|
- Next, you need to fix each frameset in NetObjects Fusion. For each frame that you define using AutoFrames, you will have to repeat this process. Click in Margin, click the Frame Tab on Properties Palette, Add this to the Frame HTML/Between Head Tags.
- Add this to the Frame HTML/Beginning of Body
|
--> <BASE TARGET="_parent"> </HEAD> <BODY BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#990000" TEXT="#000000"TOPMARGIN=0 LEFTMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0> (this last bit is all one line)
|
|
|
- For the final part of the fix, we need to change the row and column settings inside of the main page. You will notice large gaps between the header, left margin and body portions of your page in your browser.
NetObjects Fusion will write the HTML so that the column settings will be the the left margin width of your MasterBorder plus 20. (If your left margin width was 100, the HTML column width will be 120). To fix the left margin, the column settings should be the size of the left margin plus 3. (If your margin width was 100 in your MasterBorder, then the HTML column width should be 103.) NetObjects Fusion will write the HTML so that the row settings will be the the top margin height of your MasterBorder plus 18. (If your margin width was 100, the HTML row height will be 118). To fix the top margin, the row settings should be the size of the top margin plus 3. (If your top margin height was 100 in your MasterBorder, then the HTML row height should be 103.)
- Open the index.html page in Notepad and look for :
|
<FRAMESET BORDER=0 FRAMESPACING=0 FRAMEBORDER=0 COLS="120,*"> (all as one line)
|
|
Change this line to:
|
<FRAMESET BORDER=0 FRAMESPACING=0 FRAMEBORDER=0 COLS="103,*"> (also all as one line)
|
|
- Next, in Notepad look for:
|
<FRAMESET BORDER=0 FRAMESPACING=0 FRAMEBORDER=0 ROWS="118,*"> (again, all as one line)
|
|
Change this line to:
|
<FRAMESET BORDER=0 FRAMESPACING=0 FRAMEBORDER=0 ROWS="103,*"> (again, all as one line)
|
|
- View the index.html page in your browser and press SHIFT-RELOAD to reload the page from your hard drive. Now that you understand how to fix your NetObjects Fusion and TeamFusion frame problems, you have to fix all of the pages in your entire site. It is unreasonable to expect you to fix every main frame page (i.e. index.html) in your site.
One way to implement the fix is to script the column fix on the MasterBorder HTML. The problem with this is that you would have to create a separate and unique MasterBorder for every singe page with frames. This is reasonable if you have very few frame pages in your site. If you made a design decision to add frame to every page in your site, then this will not work. I recommend that you use a program called Windows GREP 2.0 to fix the column and row problem that NetObjects Fusion 3.0 creates. This will do an instant search and replace on throughout every html document in your site.
|