Keeping page centered compared to browsers

D

dtsclothing

I have seen many sites that keep their pages centered in the browser window
no matter what size the window is, as if its floating. Is this a html
code?..Speaking of wich, Im also still having problems with the magical
floating html..My FTP doesent seem to have an option for incemental or non
inc. on up loads, its the last stop on my check list, so Im searching for
anather FTP.<SCRIPT TYPE=[fun fun]>HA!</FORM>
 
D

Don Schmidt

This works only for websites created with Publisher 2000 & 2002. There are
other fixes for other versions of Publisher. Sorry, I don't have them.

Each of your html files requires adding the <center> code after the existing
</head> code.

You can go into each html file and do it manually or get the free
ReplaceInFiles program and make it an easy chore.


"ReplaceInFiles" can be downloaded from:

<http://www.emurasoft.com/index.htm>

The four boxes require the following information:

Find: </head>
Replace with: </head> <center>
File Types: *.html
In Folder:
(use the button to go to the folder where the html files are located on your
hard drive)

The bottom four boxes can be left blank.

Note: Once the boxes are filled out and the "Replace all" is selected, the
entries are retained for the next time you use the program.

Don - www.vanusa.org
------
Vancouver, USA

P.S. One of the kind visitors of this news group told us of ReplaceInFiles
program some time ago; 'Sorry I forgot the individual's name. (Another
unsung hero).
 
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.

Method One:

When you Publish to the Web direct the output to a folder on your hard drive
where you can find it.

Open the index.htm file in NotePad and right after </head> and underneath
the <body> tag string, type or copy and paste the following code after
changing the width to the width of your page:

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

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

ABOVE the </body> tag at the end of the page, type or paste the following:

</td>
</tr>
</table>


Close NotePad and save the changes to index.htm.

You will need to repeat this with each *.htm file in the index_files folder,
and then you can then upload your files. Remember, you have to do this each
time you modify your Pub file and produce new .htm files.
----------------

Method 2:

There is also a way to semi-automate this process, and it is fairly easy
with Pub 2000 and 2002 as per Don's instructions using replaceinfiles.
However, Pub 2003 and 2007 use a different coding engine and require
different steps. Spike has suggested that the following will work with Pub
2007:

Find = </v:background></xml><![endif]-->


Replace With = </v:background></xml><![endif]--><table border="0"
cellpadding="0" cellspacing="2" width="800" align="center"><tr><td>


Find </body>

Replace With </td></tr></table></body>



You should confirm that the string </v:background></xml><![endif]--> is
indeed on each of your pages of code. If it isn't then you will have to use
the <body> string. In a few cases when I have tested this, that string is
not in a Pub 2003 page.

If you find all this too tedious, then work with the left justification.
Read the article provided. Continue to use a background color or image to
fill the padding. If designed correctly a left justified page can look
great and in general will be a whole lot easier to manage using Publisher.

DavidF

dtsclothing said:
I have seen many sites that keep their pages centered in the browser window
no matter what size the window is, as if its floating. Is this a html
code?..Speaking of wich, Im also still having problems with the magical
floating html..My FTP doesent seem to have an option for incemental or non
inc. on up loads, its the last stop on my check list, so Im searching for
anather FTP.<SCRIPT TYPE=[fun fun]>HA!</FORM>
 

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