Re: How to center the web page in the screen?
- From: "Don Schmidt" <Don Engineer@xxxxxxxxxxxxxxxx>
- Date: Wed, 15 Apr 2009 12:21:52 -0700
Eric,
Just consider us as revolutionists, armed and dangerous.
--
Don - Vancouver, USA
"May your shadow be found in happy places." - Native North American
"Eric James" <no@xxxxxxxx> wrote in message
news:KKoFl.17688$oi.16429@xxxxxxxxxxxxxxxx
For the benefit of all readers, please stop repeating this erroneous
information, implementation of which results in a badly broken invalid
html document. Read any of the multitude of available documents and
tutorials on the web to find out why, but here's the gist:
A valid html document is structured like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>The document title</title>
<!-- other header tags -->
</head>
<body>
<!-- document content goes here -->
</body>
</html>
Nothing is allowed between the <html> tag pair except a <head> tag pair
containing header information, a <body> tag pair containing the body
content, or a <frameset> tag pair which I won't go into here. I woulld
suggest further reading elsewhere to see what is allowed within the <head>
and <body> blocks.
Implementing the recommended hack results in either this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>The document title</title>
<!-- other header tags -->
</head><center>
<body>
<!-- document content goes here -->
</body>
</html>
or this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>The document title</title>
<!-- other header tags -->
</head><table border="0" cellpadding="0" cellspacing="2"
width="760"align="center"><tr><td>
<body>
<!-- document content goes here -->
</body>
</html>
Both of these are invalid because neither the <center> or <table> tags are
allowed in those positions, and even if they were, the second is doubly
wrong because the table definition is missing it closing tags, viz:
</td></tr></table>
which the original author of this particular hack probably placed after
the </body> tag, but this would appear to have been lost somewhere.
The fact that documents hacked in this way display at all, let alone as
intended, relies on the leniency built into browsers which allows for a
certain amount of invalid html to be processed and certain errors to be
ignored. However, there is no standard for how this should be done, so
this is a dangerous practice which gives rise to different results in
different browsers, and even in different versions of the same browser,
which seems to be one of the main problems respondents in this newsgroup
complain of.
"Spike" <zero_spam@xxxxxxxxxx> wrote in message
news:OAwHaGdvJHA.1164@xxxxxxxxxxxxxxxxxxxxxxx
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
"RMG" <RMG@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:9C4448C2-F500-484E-9EC5-08EAB62C0F39@xxxxxxxxxxxxxxxx
Hi!
First of all, sorry for my english, but I have a doubt using MS
Publisher.
I have a simple page done in Publisher just with 4 images and 3 text
boxes.
My question is how can I center that web page in the screen of the
people
that are visiting the website. ?
Thanks for your time!
--
MS Publisher Web Designer
.
- Follow-Ups:
- Re: How to center the web page in the screen?
- From: Rob Giordano [MS MVP]
- Re: How to center the web page in the screen?
- References:
- How to center the web page in the screen?
- From: RMG
- Re: How to center the web page in the screen?
- From: Spike
- Re: How to center the web page in the screen?
- From: Eric James
- How to center the web page in the screen?
- Prev by Date: Re: How to center the web page in the screen?
- Next by Date: Re: Cannot see multiple html fragments
- Previous by thread: Re: How to center the web page in the screen?
- Next by thread: Re: How to center the web page in the screen?
- Index(es):
Relevant Pages
|
Loading