how do i make my webpage center i webbrowsers??

S

scruffy

Hi.

I have a website that i build in publisher2007, but i cant work out how to
get the site to center i a webbrowser. Help???
 
S

Spike

Scruffy

The fix to center pages using publisher 2000 and 2002
Publish to your hard drive
Edit the htm file(s) with notepad, wordpad or any other text editor and
replace <head> with

<head><center>


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

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

" All above on one line "

Be sure that you edit the </head> line and NOT the <head> line

If you are using a page width different than 760 pixels change that number
in the above 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 server

Spike
 
M

MAURH

Scruffy,

There is no built in coding for this, Publisher automatically sets it's
pages left justified so you have to use a workaround. The methods that Spike
suggests to you are good and easy to use. I find the last one works very
well for me. I use it for 2003 but it will work for 2007.



Download free from http://www.emurasoft.com/replall/index.htm then set
coding as follows:



Find: </head>



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



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.



You can copy and paste the codes from here.

Once you have set this coding, the programme remembers it so you only do
this part once.



So, when you've saved your changes to your pub. doc. and 'publish to the web',
close this file and open your folder containing your index_files and
index.htm. (I keep these in a folder on my desktop marked 'HTM & HTML')

Open 'Replace in Files' from your programmes and a box will appear. Click
'Replace in Subfolders' and '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 need to repeat this last part each time you update your pub. doc.
and before you re-publish, but it only takes a minute.



Close 'Replace in Files' and publish your website via your usual method,
when you look at your site on the web, it will be in the centre of the
screen.

Just note that this will not show in a page preview, only after you've
published.



Maureen
 
S

Spike

Maurh

Thanks for expanding my "Terse" advice. I can always depend on you and
David to be the "Verbose" authors with advice. :)

Spike
 
D

DavidF

Spike,

Just a FYI...you need to update your boilerplate.

When using Pub 2000 you add the <center> code after </head>, not <head>...or
at least I do that with my Pub 2000 sites.

And Publisher 2002 should be included with the instructions for Pub 2003 and
2007. There was an example sometime ago of a Pub 2002 website not centering
correctly unless you used the approach for Pub 2003 and 2007.

DavidF
 
D

DavidF

Thanks for adding the excellent instructions on how to use replaceinfiles.
While I may be too verbose and Spike a bit terse, I think it very helpful to
have these instructions. Without understanding how to use replaceinfiles, it
isn't practical to manually edit your publisher webpages with the centering
code.

DavidF
 
D

DavidF

Spike,

Just a FYI...you need to update your boilerplate.

When using Pub 2000 you add the <center> code after </head>, not <head>...or
at least I do that with my Pub 2000 sites. And for that matter, if memory
serves the instructions for centering Pub 2003 and 2007 code works for Pub
2000 sites too.

As per Publisher 2002 code, it should be edited as per the instructions for
Pub 2003 and 2007. There was an example sometime ago of a Pub 2002 website
not centering correctly unless you used the approach for Pub 2003 and 2007.

DavidF
 
D

Don Schmidt

David, et el,

A month or so ago I came across a tutorial on html coding and it listed
<center> while is works (fine) it has been replaced with <div align=center>.

I don't think the html police will take you away if you continue to use
<center>. <G>
 
S

scruffy

Hi there.

Just a small thanks to all of you. It worked like a charme, even if it took
me the better part of an evening to get the point... I´m just slow ;)

And as a small thank i here by invite you all to take a swing by
www.1961fury.dk just if you like cars of the old american kind. All of the
tekst is in danish but jus jump in to "GALLERIET" to wiew pictures.

Thanks again!!
Scruffy,
Vejle Denmark

"Don Schmidt" skrev:
 
D

DavidF

I see your site: http://www.vanusa.org/ which is a Pub 2000 generated site
does use the updated code where you are using </head> <div align=center> and
your pages are centering just fine. Thanks for the update.

DavidF
 
D

DavidF

Thanks for posting back. The feedback is appreciated.

Great car! My buddy had one of those in high school.

DavidF
 
D

Don Schmidt

I believe in Spike's centering of 2003 & 2007 Publisher website centering he
uses the <div align=center> as a part of the alignment modification.
 
S

Spike

David et al.

I just tested publisher 2002 using Vista and IE 8

Centering works using both
<center>
and
<table border="0" cellpadding="0" cellspacing="2"
width="760"align="center"><tr><td>

after <head> or </head>

It doesn't care

I will relook at publisher 2000 when I get to a computer that has it
installed.

Spike
 
M

MAURH

Spike,

Just a little puzzle for you. Is this coding sensitive to spelling? If I
used your coding but used UK 'centre' instead of your 'center', would it
still work?....maybe you'd like to test it out....all in the interest of
research you understand :))

Maureen
 
S

Spike

Maureen

What's weird is that it does not work and I don't get an error code Hmmmm?

Oh well. Maybe I am on the wrong side of the pond to make it work.
I'll try it again when I return.

Spike
 
D

DavidF

Thanks for the work Spike. I think that in general using <center> works with
Pub 2002, but the user this past spring or early summer found than it didn't
work on his Pub 2002 site. I was able to replicate his results. That is why
I would suggest that Pub 2002 users use the
<table border="0" cellpadding="0" cellspacing="2"
width="760"align="center"><tr><td>
approach.

If I get around to it, I will test the second approach on a Pub 2000 file,
and perhaps we can condense the instructions to just the second approach. Or
maybe Don can find the time to see if the second approach works on his Pub
2000 sites...

DavidF
 
D

Don Schmidt

David,

In Publisher 2000 and 2002 can be centered by replacing </head> with
</head> <div align=center>

</head> <center>
may also be used: it works but outdated code

or the longer string

</head><table border="0" cellpadding="0" cellspacing="2"
width="760"align="center"><tr><td>
(all of the above on one line)

All three strings work on my Publisher 2000 website, www.vanusa.org

Note: With Publisher 2003 and 2007 Publisher created websites, the third
string is required.
 
D

DavidF

OK. Thanks Don.

Then since we know that at least in one case the long string of code was
necessary for a Pub 2002 site, and that the long string works for all
versions of Publisher, should we not just give that string to everyone who
asks about centering a Publisher website? There aren't going to be too many
people asking for Pub 2000 or 2002 anyway...you and I and GeoffreyChaucer
are the only ones active in the group that still use Pub 2000. What is the
downside of offering just the long string of code to all Publisher users?

DavidF
 
S

Spike

Good idea David (I was pondering the same thought as I was waiting for the
2000 test to be completed)
I will change my boiler plate to just one string for all versions 2000 thru
2007

Spike
 

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