Jump to content


xhtml


4 replies to this topic

#1 Vandalised

    Jedi In Training

  • Members
  • PipPip
  • 307 posts
  • Gender:Male
  • Location:UK
  • Interests:Most sports, football, cricket, hockey, tennis, golf. Web design, graphic design (photoshop) Socialising with friends, going to clubs, bars, concerts.

Posted 24 February 2007 - 12:46 PM

Hey everyone, I'm using the php navigational system ?id=main&page=affiliates (not the switch version) on my web site and I am also trying to get my web pages all xhtml valid. Now this is all going fine, apart from the page affiliates on my web site. Basically, I need to add the full title head body etc on the page for it to become valid xhtml as I've used an additional div tag, but I have the problem of having a web page inside a web page. If you get that? Any thoughts? Help is very much appreicated.

Thanks,
Regards,
Rich.


>Edit: I've posted in the wrong section :P Please move, thanks :P

Edited by Rich69, 24 February 2007 - 12:49 PM.


#2 _*Creative Insanity_*

  • Guests

Posted 24 February 2007 - 12:52 PM

Only error that shows up on your page is this:

Quote

Error Line 9 column 3: document type does not allow element "HR" here.

<HR>
try <hr /> instead

#3 Vandalised

    Jedi In Training

  • Members
  • PipPip
  • 307 posts
  • Gender:Male
  • Location:UK
  • Interests:Most sports, football, cricket, hockey, tennis, golf. Web design, graphic design (photoshop) Socialising with friends, going to clubs, bars, concerts.

Posted 24 February 2007 - 02:09 PM

Please use this validator to validate the pages, theres a domain reslove problem with w3's (it apparently gets redirected to a completely different domain) Click here to go to another Validator

Thanks

Edited by Rich69, 24 February 2007 - 02:11 PM.


#4 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 24 February 2007 - 03:23 PM

The W3C's validator appears to be far more accurate then that other validator. The other validtor was saying something about being unable to validate your document because of an invalid DOCTYPE.

According to the W3C though:
Error Line 102 column 19: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.
<div id="text-left">
Which appears pretty consistant. Lines 99-105:
<div id="main">
			  <p>
				
<div id="text-left">


<strong>Affiliates</strong><br />
With you saying something about an extra div, i'm assuming you have your includes set up like:
<div id="main">
	<p>
	<?php /* Include... */ ?>
	</p>
</div>
And knowing nothing about how picky XHTML is (because i like HTML 4.01 transitional thank you very much), i would assume <div> tags shouldn't be inside <p> tags.

My simple solution would be to remove the <p> tag and change the CSS for #main to have a little padding, or maybe a margin like <p> tags default to.

#5 Vandalised

    Jedi In Training

  • Members
  • PipPip
  • 307 posts
  • Gender:Male
  • Location:UK
  • Interests:Most sports, football, cricket, hockey, tennis, golf. Web design, graphic design (photoshop) Socialising with friends, going to clubs, bars, concerts.

Posted 24 February 2007 - 05:47 PM

Well, considering your obvious hatrid for xtml, that supringly looks as if its worked :rolleyes:

Only issue now is why the W3C's validator is being redirected to that web site, as I don't own the details for the domain (my mate does) I'll have to take it up with him. Thanks for the help anyway rc :wink:





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users