|
|
 |
July 24th, 2007, 07:32 AM
|
#1
|
|
WebForumz Member
SuperMember
Join Date: Mar 2007
Location: UK
Age: 23
Posts: 86
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
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
|
|
|
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
|
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.
|
|
|
July 24th, 2007, 07:43 AM
|
#3
|
|
WebForumz Member
SuperMember
Join Date: Mar 2007
Location: UK
Age: 23
Posts: 86
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
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)
|
|
|
July 24th, 2007, 08:02 AM
|
#4
|
|
WebForumz Member
SuperMember
Join Date: Mar 2007
Location: UK
Age: 23
Posts: 86
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Attempt to validate
I have updated the file. Can you please tell me how to sort the last 2 errors please 
|
|
|
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
|
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. 
|
|
|
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
|
Re: Attempt to validate
Quote:
Originally Posted by Phixon
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
|
|
|
July 24th, 2007, 08:32 AM
|
#7
|
|
WebForumz Member
SuperMember
Join Date: Mar 2007
Location: UK
Age: 23
Posts: 86
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Attempt to validate
Quote:
- 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..
|
|
|
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
|
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..
|
|
|
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
|
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 "> </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..
|
|
|
July 24th, 2007, 09:00 AM
|
#10
|
|
WebForumz Member
SuperMember
Join Date: Mar 2007
Location: UK
Age: 23
Posts: 86
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Attempt to validate
Every time i remove a height attribute it finds another. Do I just remove all on the page?
|
|
|
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
|
Re: Attempt to validate
Quote:
Originally Posted by Phixon
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.
|
|
|
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
|
Re: Attempt to validate
Quote:
Originally Posted by Phixon
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.
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|