Aligning my web page in publisher

  • Thread starter hookhillhenry13
  • Start date
H

hookhillhenry13

Hi there,

Working publisher is great and having no problems apart from actual
alignment of the web page.

All the templates (and even custom templates) all seem to place the web page
on the left hand side when you go to view the site in preview.

I want my page to be directly in the middle with my background surrounding
it... pretty much like the most common central layouts you see for html web
pages.

I can't seem to find any option that allows the web page to central when
viewed in a browser.


help please????


thanks
 
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 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.

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 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 should be on 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.

You can now 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.

DavidF
 
M

Mo Feez

Hi

Thanx for. I tried doing that and it seems to work however the code also appears on the top left hand of the webpage. Is that whats supposed to happen?



DavidF wrote:

Publisher produces fixed width pages, that are left justified by design.
01-Sep-09

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 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.

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 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 should be on 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.

You can now 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.

DavidF

Previous Posts In This Thread:

Aligning my web page in publisher
Hi there,

Working publisher is great and having no problems apart from actual
alignment of the web page.

All the templates (and even custom templates) all seem to place the web page
on the left hand side when you go to view the site in preview.

I want my page to be directly in the middle with my background surrounding
it... pretty much like the most common central layouts you see for html web
pages.

I cannot seem to find any option that allows the web page to central when
viewed in a browser.


help please????


thanks

Publisher produces fixed width pages, that are left justified by design.
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 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.

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 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 should be on 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.

You can now 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.

DavidF


Submitted via EggHeadCafe - Software Developer Portal of Choice
Putting Twitter Realtime Search to Work
http://www.eggheadcafe.com/tutorial...24-c9960b55b669/putting-twitter-realtime.aspx
 
D

DavidF

What code? If you follow the directions for editing the source code
correctly then the page should look the same as before, but will be centered
in the browser window. Please give us a link to the page where you are
having the problem and a better description of the problem.

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