how can i center my webpage in browser using publisher 2007?


A

armile

I cant get the webpage to show up in the center of the browser window. i am
using publisher 2007. can anyone help?

thanks
 
Ad

Advertisements

S

Spike

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 ISP

Spike
 
A

armile

thanks a lot. i will give that a try.

Spike said:
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 ISP

Spike
 
P

Panos

Spike really very good your program for replacing lines..i though will be
complicated to center a whole website and also maintain it centered but
finally this program make everything for you and its very simple for use..

This is my first:) centered website http://www.iosholiday.com

thanks for sharing it
Panos
 
S

Stevan

Nice site Panos... I am wondering how you got the effect of links changing
colour when mouse goes over them? Your site is clean, to the point, well
organized and pleasing to the eye... Stevan
 
Ad

Advertisements

D

DavidF

His sites are really good. Panos is one of those people that prove just how
much you can do with Publisher and that it is not so much what tool that you
use, but how well you use the tool.

Did you notice the link to his Greek version: http://www.iosholiday.com/gr/

Here is another of his sites that is also bilingual:
http://www.bratislava.gr/

Here is the code snippet that Panos uses:

<style>
a{text-decoration:none;}
a:hover {color: ff8c00;}
</style>


---------

Did you notice that his site pages center dynamically? The workaround as
presented does work, has worked consistently and is cross browser
compatible.

DavidF
 
E

Eric James

it is not so much what tool that you use, but how well you use the tool.
Duh. Of course it is. The fact that a spade is so much more use for digging
a hole than a shovel is because you're not holding the shovel right.
Why didn't I think of that?
Keep eating your soup with the chopsticks, David.
 
A

Andy2427

Spike,
I have set my width 1500 px & while the html code does not exactly work I
was wondering how Panos was able to center the body of the web page between
pages? In other words, you suggestion worked before however only on my home
page, not any of the pther pages linked to the home pages.
Please advise, thanks!

Andy2427
 
M

MAURH

Andy,

Whilst you are waiting for Spike to reply about your width and centering
problem, can I tell you how I centre my pages, which may help.
Like you, and Panos, I have a website with multiple pages and I use the
'Replace in Files' method which Spike suggests.

I built my website in publisher 2003, although I understand it works for
2007 also.


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 and it will centre all
of your page at the same time.



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,



How this will be affected by your 1500px width I'm not sure, you may have to
wait for Spike on that, but this method on centering pages does work so it
may be worth trying in the meantime.



Maureen
 
D

DavidF

Panos used more narrow pages. You can't center a 1500 pixel wide page if
your browser window is less than 1500 pixels wide.

The width in the code snippet must be the same as the width of your page. In
your case you are using pages that are 1500 pixels wide which is a mistake
in my opinion. In most case the viewer will have to scroll horizontally to
view your pages which is a big design no-no. Your pages should be no wider
than 984 pixels wide, which is the widest default in Publisher. Furthermore
if you insist on leaving your pages 1500 pixels wide, there is no need to
center them, because once again almost everybody will have to scroll
horizontally to view all the page anyway.

As per the code only working on the first page...that is probably because
you only changed the code on the first page. If you had read the directions
provided more carefully you would have noted that the code needs to be
edited on each page, each time you change the Publisher publication and
publish. That is why we recommended using replaceinfile @
http://www.emurasoft.com/replall/ .You can follow Maureen's more complete
directions for how to use replaceinfiles.

Once again, please reconsider 1500 pixel width pages. This is a big design
mistake.

DavidF
 
Ad

Advertisements

S

Spike

Andy

Please post the URL to your site so we may evaluate what the proper width
and centering code should be.

Spike
 
Ad

Advertisements

M

monika90648

Spike,

I saw this post of yours and it is exactly what I am looking for.

I use Publisher 2007 and want to center my page. However, when I preview my page and view the source file, I am not able to amend it. Obviously, I am missing something here and am wondering if you could help me.

Thank you very much.

Monika
 

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