Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > HTML, XHTML and CSS

Reply
 
LinkBack Thread Tools
Old July 24th, 2007, 07:32 AM   #1
WebForumz Member
SuperMember
 
Phixon's Avatar
 

Join Date: Mar 2007
Location: UK
Age: 23
Posts: 86
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Phixon is on a distinguished road
Attempt to validate

Ok I have been trying to validate this web template for a while now, and its my first attempt at it. First I got it down to about 2 errors and then when it came to adding a doc type at added about 3million. What doc type do i need?

Code:
www.juxdesigns.com/hair
Phixon is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old July 24th, 2007, 07:39 AM   #2
Most Reputable Member
 

Join Date: May 2007
Location: UK
Age: 29
Posts: 1,107
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 MikeHopley is just really nice MikeHopley is just really nice MikeHopley is just really nice MikeHopley is just really nice MikeHopley is just really nice
Re: Attempt to validate

For a start, you are missing the opening <html> tag! This belongs after your Doctype.

You'd have a better chance of validating if you moved to HTML 4.01. XHTML requires all tags close, and you are not doing this at present. My recommendation:
  • Switch to HTML 4.01 Transitional, and make it validate.
  • Then try to remove all the presentational stuff to CSS.
  • Then switch to HTML 4.01 Strict, and make it validate.
  • Only then consider whether you want to use XHTML.
MikeHopley is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old July 24th, 2007, 07:43 AM   #3
WebForumz Member
SuperMember
 
Phixon's Avatar
 

Join Date: Mar 2007
Location: UK
Age: 23
Posts: 86
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Phixon is on a distinguished road
Re: Attempt to validate

woops. must have accidently removed the html tag when messing around. So whats the first bit of code i need to add (the doc type code)
Phixon is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old July 24th, 2007, 08:02 AM   #4
WebForumz Member
SuperMember
 
Phixon's Avatar
 

Join Date: Mar 2007
Location: UK
Age: 23
Posts: 86
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Phixon is on a distinguished road
Re: Attempt to validate

I have updated the file. Can you please tell me how to sort the last 2 errors please
Phixon is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old July 24th, 2007, 08:29 AM   #5
WebForumz Member
 

Join Date: Jul 2007
Location: France
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 matelot is on a distinguished road
Re: Attempt to validate

Search the forums and you'll find plenty of references. Google is also your friend.

But as a starter, try this: http://www.webforumz.com/vbarticles....e&articleid=29

It's a good article on the whys and wherefores of Doctype declarations.

Hope that helps.
matelot is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old July 24th, 2007, 08:31 AM   #6
WebForumz Member
 

Join Date: Jul 2007
Location: France
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 matelot is on a distinguished road
Re: Attempt to validate

Quote:
Originally Posted by Phixon View Post
I have updated the file. Can you please tell me how to sort the last 2 errors please
Can you at least post your errors so that we can see them?

Cheers
matelot is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old July 24th, 2007, 08:32 AM   #7
WebForumz Member
SuperMember
 
Phixon's Avatar
 

Join Date: Mar 2007
Location: UK
Age: 23
Posts: 86
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Phixon is on a distinguished road
Re: Attempt to validate

Quote:
  1. Error Line 10 column 27: there is no attribute "HEIGHT".<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).
    This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.
    How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.

    Error Line 12 column 46: there is no attribute "BACKGROUND"....lign="right" valign="top" background="images/rep_1.jpg" style="background-rep
I've been searching around but not much luck

Last edited by Phixon; July 24th, 2007 at 08:42 AM..
Phixon is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old July 24th, 2007, 08:46 AM   #8
Most Reputable Member
 

Join Date: May 2007
Location: UK
Age: 29
Posts: 1,107
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 MikeHopley is just really nice MikeHopley is just really nice MikeHopley is just really nice MikeHopley is just really nice MikeHopley is just really nice
Re: Attempt to validate

I'm not much good with tables, but...

Try shifting the "height" and "background" attributes into CSS properties.

You have:

Code:
<table width="100%" height="100%"  border="0" cellpadding="0" cellspacing="0">
Replace this with:

Code:
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="height: 100%;">
You also have:

Code:
<td align="right" valign="top" background="/images/rep_1.jpg" style="background-repeat:repeat-x; background-position:bottom ">
Replace this with:

Code:
<td align="right" valign="top" style="background: url('/images/rep_1.jpg') bottom repeat-x">

Last edited by MikeHopley; July 24th, 2007 at 08:48 AM..
MikeHopley is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old July 24th, 2007, 08:49 AM   #9
WebForumz Member
 

Join Date: Jul 2007
Location: France
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 matelot is on a distinguished road
Re: Attempt to validate

Quote:
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="right" valign="top" background="images/rep_1.jpg" style="background-repeat:repeat-x; background-position:bottom "><table width="100%" height="470" border="0" cellpadding="0" cellspacing="0">
<tr>
<td background="images/rep_2.jpg" style="background-position:top left; background-repeat:repeat-x ">&nbsp;</td> </tr>
Error #1 means that your Doctype (HTML4.01 Trans) doesn't support the height attribute, so take it out. When you start designing without tables, you'll use CSS to set height on elements as required.

Error #2. You've set an image (rep_1.jpg) as a background in a TD, then tried to style it with background-repeat without declaring the image in the style. And you don't want it referenced twice.

Try style="background: url(images/rep_1.jpg) repeat-x top left"

I haven't tested it, but see how it goes.

Last edited by matelot; July 24th, 2007 at 08:51 AM..
matelot is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old July 24th, 2007, 09:00 AM   #10
WebForumz Member
SuperMember
 
Phixon's Avatar
 

Join Date: Mar 2007
Location: UK
Age: 23
Posts: 86
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Phixon is on a distinguished road
Re: Attempt to validate

Every time i remove a height attribute it finds another. Do I just remove all on the page?
Phixon is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old July 24th, 2007, 10:24 AM   #11
Most Reputable Member
 

Join Date: May 2007
Location: UK
Age: 29
Posts: 1,107
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 MikeHopley is just really nice MikeHopley is just really nice MikeHopley is just really nice MikeHopley is just really nice MikeHopley is just really nice
Re: Attempt to validate

Quote:
Originally Posted by Phixon View Post
Every time i remove a height attribute it finds another. Do I just remove all on the page?
Not all the heights. You should keep the heights on images (<img>).

All the <table>, <tr>, and <td> elements, however, need fixing. Either remove the height, or shift it to style="height:100%;" as before.
MikeHopley is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old July 24th, 2007, 10:25 AM   #12
WebForumz Member
 

Join Date: Jul 2007
Location: France
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 matelot is on a distinguished road
Re: Attempt to validate

Quote:
Originally Posted by Phixon View Post
Every time i remove a height attribute it finds another. Do I just remove all on the page?
The validator will find an error e.g. a height attribute in a table. Logically, if that attribute is not supported, then pre-empt the validator and remove similar occurrences.

You'll soon get the hang of it: we've all been through it.
matelot is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

Tags
validator


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
My first attempt at web design! Jingle Your Design and Layout 6 April 21st, 2008 11:14 AM
Logo attempt unitedcraig Graphic Specifics 25 January 18th, 2008 06:23 PM
First preloader attempt Rick Flash and ActionScript 5 September 28th, 2007 03:07 PM
Attempt at a logo pa007 Graphic Specifics 7 March 2nd, 2007 08:10 AM
1st attempt at lip syncing daygon Flash and ActionScript 2 May 9th, 2006 11:27 PM


Search Engine Optimization by vBSEO 3.2.0 RC8