D
DavidF
Don has been providing good instructions for centering Pub 2000 and 2002
files for some time, but we have been fumbling around trying to center Pub
2003 and 2007 pages. Jo and Spike provided some code and methods, but they
didn't seem to work in all cases, or be very easy. I think I have found two
methods of centering your webpages that appears to work for Publisher 2003
and 2007. Would any and all of you test these methods and see if they work
for you? Also if any part of directions are unclear or come up short, please
note that too. Thanks.
-------------
Directions for centering web pages in Publisher 2003 and 2007:
When you "Publish to the Web" direct the output (the index.htm file and the
index_files folder if you are using the subfolder option) to a folder on
your computer where you can find it. Each of your *.htm files requires
adding a centering code after the existing </head> code.
Method 1: Manual method.
Go to the folder on your computer where you directed your web files.
Open each *.htm file in NotePad by right clicking the file > open with >
NotePad. If you are using the subfolder option in Pub 2003 or 2007, your
index.htm file is your home page, and your other *.htm files for your other
pages are usually contained in a subfolder called "index_files".
Find the </head> code, and replace with:
</head><table border="0" cellpadding="0" cellspacing="2"
width="760"align="center"><tr><td>
If you are using a page width that is different than 760 pixels, change the
width in the code string with the width of your web pages. Close NotePad and
save the changes.
After editing the code on each *.htm file and opening the edited .htm files
in IE to test the change, you can upload your files to your host.
Method 2: Semi-automatic method.
With this method you can find the </head> code, and replace it with the
revised code string in each *.htm file semi-automatically.
Download and install the free "Replace In Files" program:
http://www.emurasoft.com/index.htm
Open "Replace in Files". The four boxes in the "Replace in Files" program
require the following information:
Find: </head>
Replace with: </head><table border="0" cellpadding="0" cellspacing="2"
width="760"align="center"><tr><td>
(Note: the code string may wrap in this message, but it is one line. Also
change the width to the pixel width of your web pages.)
File Types: *.htm
In Folder: Use the ... button to browse to the folder where you directed
your web files on your computer when you Publish to Web.
Assuming that you are using a subfolder, check the box at the bottom
"Replace in Subfolders".
Click "Replace All", and you should get a "Finished" dialog that will
confirm the replaced strings of code for each *.htm file/page in your web
files.
After opening the edited .htm files in IE to test the change, you can upload
your index.htm file and your index_files folder to your host.
You will have to run Replace in Files each time you modify your Pub file and
produce new web files.
However, once the options in Replace in Files are filled out and the
"Replace all" is selected, the entries are retained for the next time you
use the program.
-----------
Thanks for testing these instructions and offering any feedback about how
they could be written so they are more clear. Let me know...thanks.
DavidF
files for some time, but we have been fumbling around trying to center Pub
2003 and 2007 pages. Jo and Spike provided some code and methods, but they
didn't seem to work in all cases, or be very easy. I think I have found two
methods of centering your webpages that appears to work for Publisher 2003
and 2007. Would any and all of you test these methods and see if they work
for you? Also if any part of directions are unclear or come up short, please
note that too. Thanks.
-------------
Directions for centering web pages in Publisher 2003 and 2007:
When you "Publish to the Web" direct the output (the index.htm file and the
index_files folder if you are using the subfolder option) to a folder on
your computer where you can find it. Each of your *.htm files requires
adding a centering code after the existing </head> code.
Method 1: Manual method.
Go to the folder on your computer where you directed your web files.
Open each *.htm file in NotePad by right clicking the file > open with >
NotePad. If you are using the subfolder option in Pub 2003 or 2007, your
index.htm file is your home page, and your other *.htm files for your other
pages are usually contained in a subfolder called "index_files".
Find the </head> code, and replace with:
</head><table border="0" cellpadding="0" cellspacing="2"
width="760"align="center"><tr><td>
If you are using a page width that is different than 760 pixels, change the
width in the code string with the width of your web pages. Close NotePad and
save the changes.
After editing the code on each *.htm file and opening the edited .htm files
in IE to test the change, you can upload your files to your host.
Method 2: Semi-automatic method.
With this method you can find the </head> code, and replace it with the
revised code string in each *.htm file semi-automatically.
Download and install the free "Replace In Files" program:
http://www.emurasoft.com/index.htm
Open "Replace in Files". The four boxes in the "Replace in Files" program
require the following information:
Find: </head>
Replace with: </head><table border="0" cellpadding="0" cellspacing="2"
width="760"align="center"><tr><td>
(Note: the code string may wrap in this message, but it is one line. Also
change the width to the pixel width of your web pages.)
File Types: *.htm
In Folder: Use the ... button to browse to the folder where you directed
your web files on your computer when you Publish to Web.
Assuming that you are using a subfolder, check the box at the bottom
"Replace in Subfolders".
Click "Replace All", and you should get a "Finished" dialog that will
confirm the replaced strings of code for each *.htm file/page in your web
files.
After opening the edited .htm files in IE to test the change, you can upload
your index.htm file and your index_files folder to your host.
You will have to run Replace in Files each time you modify your Pub file and
produce new web files.
However, once the options in Replace in Files are filled out and the
"Replace all" is selected, the entries are retained for the next time you
use the program.
-----------
Thanks for testing these instructions and offering any feedback about how
they could be written so they are more clear. Let me know...thanks.
DavidF