Publisher 2007. Web site is not in the middle per automatic. Why?

I

Ike

I am using Publisher 2007 to design my web site. It went well so far, but I
can´t get the program to automatically center my web site in web page mode??
I have used a lot of my time for that with none positive result. And how do I
create submenus?

Ike, Denmark
 
D

Don Schmidt

I believe it can be done but it takes some hacking of your website files.
I'm a Publisher 2000 user and it is much different (easier) than 2007.
Be patient and you may get the steps to get your site centered.
 
D

DavidF

Publisher produces fixed width pages, that are left justified by design.

Reference: Understanding background padding in a Publisher web (aka white
space):
http://msmvps.com/blogs/dbartosik/archive/2006/01/07/80563.aspx

If you want to center your pages, there is no built-in capability of
centering your pages, but you can manually edit the html code of each *.htm
file (each web page). However you have to do this each time you update your
site. This code edit is not saved in the Publisher file and must be redone
each time you republish. This may make it impractical unless you are
comfortable editing the code each time. You CAN produce good looking left
justified sites, and it might not be worth the effort to center the pages.
But...

Here are some directions for centering Pub 2003 and 2007 pages. Pub 2000 and
2002 require different code edits:

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, perhaps your Desktop. You will need to
add a string of "centering" code to each of your *.htm files, 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".

In Notepad,

Find:
</head>

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 combine it to one line
to use in Replace in files. Also change the width to the pixel width of your
web pages if different than 760 pixels.

File Types:
*.htm

In Folder:
Use the ... button to browse to the folder where you saved your web files on
your computer.

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.

----------------

If by submenus, you mean drop-down or flyout menus, there is no built-in
ability to do this in a Publisher web. You can insert some javascript
dropdown menus with the insert html code fragment tool. Google for "dropdown
menus" or "DHTML menus" for different free scripts. Then just try them out
until you find one that works and you like.

DavidF
 
I

Ike

Thanks a lot DavidF.

DavidF said:
Publisher produces fixed width pages, that are left justified by design.

Reference: Understanding background padding in a Publisher web (aka white
space):
http://msmvps.com/blogs/dbartosik/archive/2006/01/07/80563.aspx

If you want to center your pages, there is no built-in capability of
centering your pages, but you can manually edit the html code of each *.htm
file (each web page). However you have to do this each time you update your
site. This code edit is not saved in the Publisher file and must be redone
each time you republish. This may make it impractical unless you are
comfortable editing the code each time. You CAN produce good looking left
justified sites, and it might not be worth the effort to center the pages.
But...

Here are some directions for centering Pub 2003 and 2007 pages. Pub 2000 and
2002 require different code edits:

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, perhaps your Desktop. You will need to
add a string of "centering" code to each of your *.htm files, 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".

In Notepad,

Find:
</head>

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 combine it to one line
to use in Replace in files. Also change the width to the pixel width of your
web pages if different than 760 pixels.

File Types:
*.htm

In Folder:
Use the ... button to browse to the folder where you saved your web files on
your computer.

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.

----------------

If by submenus, you mean drop-down or flyout menus, there is no built-in
ability to do this in a Publisher web. You can insert some javascript
dropdown menus with the insert html code fragment tool. Google for "dropdown
menus" or "DHTML menus" for different free scripts. Then just try them out
until you find one that works and you like.

DavidF
 
J

Jamie

Does anybody know if there is going to be a fix for this?

I'd love to see an update, as publisher is a great and easy way to do
websites.

thanks.
 
M

MAURH

Hi Jamie,

As far as I know MS have not got an update for this problem...yet. But if
you use DavidF's solution with 'Replace in Files', it really does work.
I use 2003 for my website and use this method to centre my pages. Once you
have set it up it's only a couple of extra clicks before you publish and
you're done. Try it, it's easy.

Maureen
 
D

DavidF

Not in the near future. There are many bugs that aren't by design that MS
has not got around to fixing, so changing something that is by design isn't
likely to be a very high priority. You will have to work around the fact
that Publisher does not have a built-in way of centering pages. But it
really isn't that hard once you get it set up with Replaceinfile. Only a
couple more clicks.

DavidF
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top