|
Posted by Jonathan N. Little on 10/24/06 15:51
John wrote:
> Hi
>
> Many thanks. Point taken. A lot of the code will be 'generated' from Perl
> which does have a habit of putting <html> tags every where.
Actually, no it doesn't. You are using the CGI.pm correct?
my $q = new CGI;
print $q->header, $q->p('This is a paragraph');
generates only:
<p>This is a paragraph</p>
> Actually with
> few problems. It shows how robust HTML is.
No it shows how 'forgiving' your browser is. Old Netscape would have
ended the display of your document at the first </html>
> The <table> strangely does work
> here.
Again no not really. What are you expecting that it does, center your
menu on the page? If so maybe you ought to see what a real web browser
does with your page and not depend of IE's interpretation.
> I know I should not use <table align='center'> and rather use <div
> align='center'> blah blah </div> but in the Validator even that causes a
> hiccup.
That's absurd it is like saying "My car won't start, I painted it red
didn't work and I hit it with a hammer and it didn't work either". Wrong
method entirely.
To prove it can be done with valid markup:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Valid Template</title>
<style type="text/css">
#navbar { text-align: center; font: 80% sans-serif; }
#navbar UL { list-style: none; margin: 0; padding: 0; }
#navbar LI { margin: 0 .05em; padding: 0; display: inline;
line-height: 2 }
#navbar A { text-decoration: none; padding: .2em 1em; border: 1px
solid #aaf; }
#navbar A:link, #navbar A:visited { color: #fff; background-color:
#50c; }
#navbar A:hover, #navbar A:active { color: #50c; background-color:
#fff; }
</style>
</head>
<body>
<div id="navbar">
<ul>
<li><a href="home.shtml">Home</a></li>
<li><a href="flights.pl">Flights</a></li>
<li><a href="hotels.shtml">Hotels</a></li>
<li><a href="cars.shtml">Car Rental</a></li>
<li><a href="cruises.shtml">Cruises</a></li>
<li><a href="holidays.shtml">Holidays</a></li>
<li><a href="bargains.shtml">Bargains</a></li>
<li><a href="MyZampf.pl">MyZampf</a></li>
<li><a href="contact.shtml">Contact Us</a></li>
</ul>
</div>
</body>
</html>
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
[Back to original message]
|