Centering and Publishing Page

K

KWB

I am new to the web design with publisher but have been using the program for
years and love it. I currently have the 2007 version. I would like to center
my pages on the web. I have read on this discussion board about editing the
htm file by adding to the <head> line. I have published the site to my hard
drive and have tried editing the htm file but am not able to figure it out. I
am not 100% sure about publishing to the web anyway for I have only done
design work with publisher that gets printed. Any tips for publishing and
centering the pages????
 
S

Spike

The simple fix to center pages using publisher 2007
Publish to your hard drive
Edit the htm file and replace </head> with

</head><table border="0" cellpadding="0" cellspacing="2"
width="760"align="center"><tr><td>

NOTE: the above needs to be all on one line:

If you are using a page width different than 760 pixels change that number
in the above line

For a single page editing with notepad is the easiest for first time
publishers

Make sure that you edit the </head> line and not the <head> line

If you have multiple pages you might want to look at
http://www.emurasoft.com/replall/ a simple replace lines in multiple htm
files

Then ftp the files to your ISP

Let's get it centered first and then the next step, get it on the web

Spike
 
K

KWB

Spike,
I have read your response to the centering of the pages many times across
this board. I have searched this issue and you have responded to many people.
My problem is the editing. How do I "Edit"? If I right click on the html file
(I do not have a htm file) to show me the edit option, then click edit, it
opens the file as a Word doc. I also tried to edit the line in the Notepad. I
added all of your info to the <head> line and saved the file. But then what.
Do I need to save the notepad file as a notepad file or exactly what do I
need to do. It seems as if you have helped many with this issue and I feel
there is something I am missing. Any help is much appreciated.
 
R

Rob Giordano [MS MVP]

Open the html file with NOTEPAD and just save it back as the same file html.
Keep in mind you will have to do this everytime you make changes to pages,
because Publisher will remove what you have added with Notepad.


--
~~~~~~~~~~~~~~~~~~
Rob Giordano
Microsoft MVP Expression
 
S

Spike

Your comment:

added all of your info to the <head> line and saved the file

You must add to the </head> line NOTE: the "/" in front of head

<head> is the beginning of the HEAD section
</head> is the end of the HEAD section

In publisher 2007 the centering line MUST be at the end of the HEAD section

As far as saving the file
If you open the file with notepad, just do a save and it will over write the
existing htm or html file

Spike
 
G

Gypsey

Hi Spike, I am having the same problem as KWB. I tried changing the html
code as you suggested and it worked.. i was thrilled, however, it only
changed the first page. I have 90 pages in my publisher document that all
need to be centred. I did try the find and replace app u suggested, but it
couldn't find any more text to replace.. i am desperate, please help.. (also
I am a complete novice at this, so please be gently)
 
D

DavidF

Here are some alternative directions for using Replace in Files.

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.

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 on your computer where
you saved your index.htm (home page) and the index_files folder which
contains the other pages in your site.

Assuming that you are using a subfolder, check the box at the bottom
"Replace in Subfolders". (This is the step you may have missed.)

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

B Greg

Take a look at my response to Gigi's post on 11-11, she had the same question

Brian G
 

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