Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-31-2005, 06:08 PM
WebProWorld Member
 

Join Date: Apr 2004
Location: Netherlands
Posts: 80
wen_laat RepRank 0
Default HTML validation help

I don't know if this is the correct forum for this question, but I didn't know where else to put it.

I've been working on my html validation, because I never really paid attention to it, until I started to use Firefox and Safari, and I really want to have a validated html code.

Well, I went from over 70-80(!) errors to 2. I'm kinda happy with that, but 2 is still too much. I've tried everything to correct these 2 errors, but nothing works, so I'm hoping someone here can help me.

Here's the link with the errors and my url:
Validation Page
__________________
For all your typical Dutch products
info@typicaldutchstuff.com

Our website was featured in the UK Sunday Times of October 10th
Reply With Quote
  #2 (permalink)  
Old 01-31-2005, 07:46 PM
paulhiles's Avatar
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: UK
Posts: 2,803
paulhiles RepRank 0
Default

First error is easiest to fix...
you have two body tags! :o)

Quote:
Originally Posted by W3C Validator
21: <body>
22: <body bgcolor="#F9E5F1">
Reply With Quote
  #3 (permalink)  
Old 01-31-2005, 07:48 PM
WebProWorld Pro
 

Join Date: Nov 2004
Posts: 144
rivux RepRank 0
Default

You have two body tags, you need to remove one of them.

Code:
<body>
<body bgcolor="#F9E5F1">
__________________
PortalBoost
Reply With Quote
  #4 (permalink)  
Old 01-31-2005, 07:48 PM
WebProWorld Pro
 

Join Date: Nov 2004
Posts: 144
rivux RepRank 0
Default

haha sorry paul, was posted the same time as you.
__________________
PortalBoost
Reply With Quote
  #5 (permalink)  
Old 01-31-2005, 07:50 PM
paulhiles's Avatar
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: UK
Posts: 2,803
paulhiles RepRank 0
Default

LOL!! Think we collided mid-air! I felt some sort of collision anyway! :o)
Reply With Quote
  #6 (permalink)  
Old 01-31-2005, 07:55 PM
paulhiles's Avatar
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: UK
Posts: 2,803
paulhiles RepRank 0
Default

Error number two...
Line 26: Try this.....

<td colspan="2" bgcolor="#F5AFD5" height="90" width="750">[img]Websitepics/bannner.png[/img]</td></tr>

An alternate solution might be to use CSS to load the background image, and might save you a few bytes. Are you using the same image for each page header?

Paul
Reply With Quote
  #7 (permalink)  
Old 02-01-2005, 06:03 AM
WebProWorld Member
 

Join Date: Apr 2004
Location: Netherlands
Posts: 80
wen_laat RepRank 0
Default

thanks so much you guys, my page is now valid! How would I use CSS to load the background image? I'm using the same one for every page.

Another thing, before the page was validated (and had loads of errors), the page looked perfect in IE; the text was aligned to the left. In Firefox it was a bit different; it was centralized. Now with the valid html it looks perfect in Firefox and in IE it looks like it was before with Firefox. (hope this makes sense) How is this possible?
__________________
For all your typical Dutch products
info@typicaldutchstuff.com

Our website was featured in the UK Sunday Times of October 10th
Reply With Quote
  #8 (permalink)  
Old 02-01-2005, 02:41 PM
WebProWorld Pro
 

Join Date: Nov 2004
Posts: 144
Sanjo RepRank 0
Default

Looks like you've gotten everything taken care of.

You are quick!
Reply With Quote
  #9 (permalink)  
Old 02-02-2005, 06:48 PM
WebProWorld Member
 

Join Date: Apr 2004
Location: Netherlands
Posts: 80
wen_laat RepRank 0
Default

Thanks you guys!

you know what's strange; in IE my pages look crappy when validated and they look perfect in Firefox/Safari, whilst this first was the other way around. Does IE just not accept the html?
__________________
For all your typical Dutch products
info@typicaldutchstuff.com

Our website was featured in the UK Sunday Times of October 10th
Reply With Quote
  #10 (permalink)  
Old 02-02-2005, 07:37 PM
paulhiles's Avatar
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: UK
Posts: 2,803
paulhiles RepRank 0
Default Invalid tags in your CSS stylesheet

Hi wen_laat,

try using the following as your style.css

/* Stylesheet for TypicalDutchStuff */
a:link {
color:#333333;
text-decoration:none;
}
a:visited {
color:#333333;
text-decoration:none;
}
a:active {
color:#333333;
text-decoration:none;
}
a:hover {
color:#FF4040;
text-decoration:none;
}

body, tr, p, td {
font-size:8pt;
font-family:verdana;
color:#000000;
}

.heading {
text-align:center;
font-size:9pt;
font-family:verdana;
font-weight:bold;
color:#000000;
}


I noticed you have some code comments and <style> tags that are causing some discrepancies between the Firefox view and IE. Check and debug any differences after you've uploaded this modified stylesheet.

Paul
Reply With Quote
  #11 (permalink)  
Old 02-03-2005, 02:14 PM
WebProWorld Member
 

Join Date: Apr 2004
Location: Netherlands
Posts: 80
wen_laat RepRank 0
Default

paulhiles:

Thank you. I've changed the stylesheet, and tried to validate another page, which isn't working. I've used the same things as my index page which is verified, but some things don't seem to be correct now, while they are on the other page.

Not validated yet

Also, I've found that as soon as I use
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd">
then the text aligns strangely in IE, but allright in other browers.

What am I doing wrong? I've been trying different things all day, but seem to be stuck. :(
__________________
For all your typical Dutch products
info@typicaldutchstuff.com

Our website was featured in the UK Sunday Times of October 10th
Reply With Quote
  #12 (permalink)  
Old 02-03-2005, 03:05 PM
paulhiles's Avatar
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: UK
Posts: 2,803
paulhiles RepRank 0
Default Server side include (SSI) in the wrong spot?

Quote:
Originally Posted by wen_laat
I've used the same things as my index page which is verified, but some things don't seem to be correct now, while they are on the other page.
Not validated yet
On the feedback page you need to close the <head> of your document. Looks as though you have an include file / SSI in the wrong spot! There is HTML code for a table running straight after the closing script tag. The closing </head> and <body> tags are way down at line 267, 268! :o)

Paul
Reply With Quote
  #13 (permalink)  
Old 02-03-2005, 05:27 PM
WebProWorld Member
 

Join Date: Apr 2004
Location: Netherlands
Posts: 80
wen_laat RepRank 0
Default Re: Server side include (SSI) in the wrong spot?

Quote:
Originally Posted by paulhiles
Quote:
Originally Posted by wen_laat
I've used the same things as my index page which is verified, but some things don't seem to be correct now, while they are on the other page.
Not validated yet
On the feedback page you need to close the <head> of your document. Looks as though you have an include file / SSI in the wrong spot! There is HTML code for a table running straight after the closing script tag. The closing </head> and <body> tags are way down at line 267, 268! :o)

Paul
Ok, you have no idea how silly I just felt. The include file was inside the head tag, how could I overlook that?! *blushes* It's now validated, but when I use this code:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd">
It messes up the layout, so I'm just using
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
and it works perfectly in IE and Firefox!

I'm so thrilled, I'm going to change all the pages and then my site will be entirely validated! Who needs Oscommerce when you can do it all by hand ;)

Thanks again Paul, you've helped me a lot!
__________________
For all your typical Dutch products
info@typicaldutchstuff.com

Our website was featured in the UK Sunday Times of October 10th
Reply With Quote
  #14 (permalink)  
Old 02-03-2005, 07:38 PM
paulhiles's Avatar
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: UK
Posts: 2,803
paulhiles RepRank 0
Default Great stuff!

Great to hear you've managed to get that sorted!
I think we have the makings of another hand-coder here! :o)

Paul
Reply With Quote
  #15 (permalink)  
Old 02-03-2005, 07:55 PM
WebProWorld Member
 

Join Date: Apr 2004
Location: Netherlands
Posts: 80
wen_laat RepRank 0
Default Re: Great stuff!

Quote:
Originally Posted by paulhiles
Great to hear you've managed to get that sorted!
I think we have the makings of another hand-coder here! :o)

Paul
Thanks! I did encounter another problem though, was almost afraid to ask, as I've asked so much already ;)

EDITED: I'm working on my other pages, but it seems as though the EUR symbol(€) gives an error, is there any way around this?
Just fixed this myself!

Also, I use Mals shopping cart, and the code seems to contain an error, but when I change it, the cart probably won't work properly.

One error left..

Thanks! (If I can figure out this thing, I can probably manage to do all my pages..
__________________
For all your typical Dutch products
info@typicaldutchstuff.com

Our website was featured in the UK Sunday Times of October 10th
Reply With Quote
  #16 (permalink)  
Old 02-04-2005, 05:37 AM
paulhiles's Avatar
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: UK
Posts: 2,803
paulhiles RepRank 0
Default The form was incorrectly nested

You have three forms in the left-hand column and two in the main page content. The form that's causing the problem is the "newsletter" one. There are some invalid tags in there, table cells, font tags, etc!

Try using this instead...

<table bgcolor="#FBEBF3" border="0" cellpadding="3" cellspacing="0">
<tr><td align="center"><font size=1 face="Verdana,Arial,Helvetica">Join the Typical Dutch Stuff mailing list </font></td></tr>
<tr><td align="center"><font size=1 face="Verdana,Arial,Helvetica">Email:</font>
<form name="newsletter" action="http://www.typicaldutchstuff.com/newsletter.html" target="_blank" method="get">
<input type=text name="email" size=15>
<input type=submit name="go" value="Sign up">
</form></td></tr>
</table>


The form's attributes/values need quotes("") around the values too! That's about it, I think! :o)

One other point, you're displaying linked images from two other sites (the W3C logo and GeeksOnSteroids banner). I would advise you to have these images on your own server, as they're currently slowing down the page loading.

Paul

PS. Try taking some of your font tags out and replacing with CSS styled elements!
Reply With Quote
  #17 (permalink)  
Old 02-04-2005, 08:18 AM
WebProWorld Member
 

Join Date: Apr 2004
Location: Netherlands
Posts: 80
wen_laat RepRank 0
Default

thank you! It's been fixed, you've helped me so much!

I don't really work with CSS, so have no idea how to change the fonts?
__________________
For all your typical Dutch products
info@typicaldutchstuff.com

Our website was featured in the UK Sunday Times of October 10th
Reply With Quote
  #18 (permalink)  
Old 02-04-2005, 08:28 AM
paulhiles's Avatar
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: UK
Posts: 2,803
paulhiles RepRank 0
Default Glad to have helped!

Quote:
Originally Posted by wen_laat
thank you! It's been fixed, you've helped me so much!
You're welcome! Glad to have helped!

Quote:
Originally Posted by wen_laat
I don't really work with CSS, so have no idea how to change the fonts?
You could reduce your page sizes marginally by utilising more CSS, but you're not using so many font tags, I guess I'll let you off!
Any questions you might have on CSS, just try the Site Design forum and ask around, there are lots of knowledgeable members there! :o)

Paul
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0