Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Markup (HTML, XHTML, XML) _ Need help with Validation

Posted by: hafdis Mar 13 2007, 04:38 PM

Hi all, i am from Iceland, nice forum you got here smile.gif

Well, lets get started.
I am working on my site http://www.koddinn.com using wordpress, when i enter the photo gallery i get this http://www.koddinn.com/myndir/

this is Validation Result i get http://validator.w3.org/check?uri=http%3A%2F%2Fwww.koddinn.com%2Fmyndir%2F

lets take error nr 15.

CODE
# Error  Line 259, column 6: end tag for "div" omitted, but OMITTAG NO was specified .

</body>

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".


how would this line be fixed ?


can someone explain to me, "how" i can fix this.

thx

Posted by: pandy Mar 13 2007, 05:27 PM

Hi! tongue.gif

Then close it, dear hafdis, dear hafdis. Then close it, dear haftis. Dear haftis, close it! *pandy singing in his most beautiful voice* laugh.gif

The validator marks the last spot where the DIV that starts on line 38 must be closed. Top of the browser here.
http://www.htmlhelp.com/cgi-bin/validate.cgi?url=http%3A//www.koddinn.com/myndir/&warnings=yes&input=yes#L38

Let me say that I love your country. I visted there for a summer in my youth and have wanted to move there ever since. smile.gif

Posted by: Christian J Mar 13 2007, 05:32 PM

It's best to start fixing errors from the top, often that makes subsequent ones go away in the process. The first one is a warning on line 73 that you haven't encoded the & character in the URL, see http://htmlhelp.com/tools/validator/problems.html.en#amp next comes an error on line 77 since P elements are not allowed inside links.

Posted by: hafdis Mar 13 2007, 06:01 PM

QUOTE(pandy @ Mar 13 2007, 05:27 PM) *

Hi! tongue.gif

Then close it, dear hafdis, dear hafdis. Then close it, dear haftis. Dear haftis, close it! *pandy singing in his most beautiful voice* laugh.gif

The validator marks that last spot where the DIV that starts on line 38 must be closed. Top of the browser here.
http://www.htmlhelp.com/cgi-bin/validate.cgi?url=http%3A//www.koddinn.com/myndir/&warnings=yes&input=yes#L38

Let me say that I love your country. I visted there for a summer in my youth and have wanted to move there ever since. smile.gif


hehe, always welcome back to Iceland dear smile.gif

well, i am gonna try to fix this from error to error,

on line 73, how do i fix this line for start ...............

and i did closed div on line 38, so its only 7 errors left unsure.gif

Posted by: Darin McGrew Mar 13 2007, 06:41 PM

QUOTE(hafdis @ Mar 13 2007, 04:01 PM) *
on line 73, how do i fix this line for start
You need to replace
CODE
src='.../fim_thumb.php?album=vestmannaeyjar&image=eyja.jpg'
with
CODE
src='.../fim_thumb.php?album=vestmannaeyjar&amp;image=eyja.jpg'

Posted by: hafdis Mar 14 2007, 07:21 AM

ok,......... where can i find it, i have search in every file dry.gif

Posted by: Frederiek Mar 14 2007, 08:01 AM

QUOTE(hafdis @ Mar 14 2007, 01:21 PM) *

ok,......... where can i find it, i have search in every file dry.gif

In line 73 of http://www.koddinn.com/myndir/.
Follow the validation link that Pandy did on your url. The imput has line numbers, so go to line 73:

<a href='http://www.koddinn.com/myndir/album/vestmannaeyjar/'><img src='http://www.koddinn.com/wp-content/plugins/fgallery/functions/fim_thumb.php?album=vestmannaeyjar&image=eyja.jpg' alt='Image'/></a>

Posted by: hafdis Mar 14 2007, 11:59 AM

ok, done with this, now its line 77

http://validator.w3.org/check?uri=http%3A%2F%2Fwww.koddinn.com%2Fmyndir%2F

this is line 77
<a href='http://www.koddinn.com/myndir/album/vestmannaeyjar/'><p>Vestmannaeyjar
78 </p>

what does it mean with <p> how do i fix this

Posted by: pandy Mar 14 2007, 12:18 PM

I've been there! It was hot under the feet. biggrin.gif

"document type does not allow element "p" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag "

That means you have nested a block level element, P, inside an inline element, A. Inline elements can't contain block level elements. Instead of saying that straight out the validator lists elements that can be contained in inline element and can in their turn contain block level elements. They can function both as inline and block level.
http://htmlhelp.com/reference/html40/inline.html
Now, the validator doesn't suggest you put one of those elements in. It just points out that the code would have been valid if you had used one of them. tongue.gif

See?

CODE
<a href='http://www.koddinn.com/myndir/album/vestmannaeyjar/'><p>Vestmannaeyjar
</p>
</a>


You have <a>p></p></a> instead of the other was around.

Posted by: Darin McGrew Mar 14 2007, 01:01 PM

QUOTE(pandy @ Mar 14 2007, 10:18 AM) *
Now, the validator doesn't suggest you put one of those elements in. It just points out that the code would have been valid if you had used one of them.
Just for completeness, this is one of those areas where the text of the specification includes restrictions that cannot be expressed in the DTD, and thus, that cannot be checked by the validator. The listed elements (object, applet, map, iframe, button, ins, del) can contain block-level elements, and can be used inside inline elements, but they are not supposed to contain block-level elements while being used inside inline elements. So the validator (which only checks the markup against the DTD) is technically correct, in that the DTD would allow the block-level P element inside one of these elements inside the inline A element, but the error message is misleading because you shouldn't do that.

And FWIW, the message displayed by our validator is
CODE
Error: element p not allowed here; possible cause is an inline element containing a block-level element
Both validators report the same errors, but the error messages used by our validator are often more clear than those used by the W3C's validator.

Posted by: hafdis Mar 16 2007, 04:43 PM

Hi............... again

Can you masters here located div tag that i have to close, i cant find it, so i can get my sidebar on right place.

unsure.gif

Posted by: pandy Mar 16 2007, 04:51 PM

It seems like you have closed it now.
http://www.htmlhelp.com/cgi-bin/validate.cgi?url=http%3A//www.koddinn.com/myndir/&warnings=yes&input=yes#L38
Judging form the class name it's supposed to be wrapped around other content, not be just empty as it is now. blink.gif

CODE
<div class="outer-container"></div>

Posted by: Darin McGrew Mar 16 2007, 04:52 PM

Looking at http://www.htmlhelp.com/cgi-bin/validate.cgi?url=http%3A%2F%2Fwww.koddinn.com%2Fmyndir%2F&warnings=yes, I don't see any reports of unclosed DIV elements. I do see a lot of paragraph (P) elements inside link (A) elements, which is not allowed. Actually, the paragraph (P) elements are inside link (A) elements which are inside heading (H4) elements, and you can't put paragraphs inside heading elements either.

Posted by: pandy Mar 16 2007, 05:28 PM

OK, I've figured it out, I think. You are only allowed tor read this post if you promise to fix all the validation errors. angry.gif

That DIV on line 38 - it's supposed to wrap the whole lot. So place the closing tag last, just before the closing body tag.

The menu is floated left. That doesn't do any good because it comes after the content in the code and it's locked in in the content column. Cut the whole navigation thing out, that's all between <div class="navigation"> and the footer div, and paste it in at the top of the div with the call 'main'.

Now you keep your part of the deal. We'll be checking! tongue.gif

Posted by: hafdis Mar 23 2007, 03:57 AM

QUOTE(pandy @ Mar 16 2007, 05:28 PM) *

OK, I've figured it out, I think. You are only allowed tor read this post if you promise to fix all the validation errors. angry.gif

Now you keep your part of the deal. We'll be checking! tongue.gif


smile.gif
ok, there is no validation error now ohmy.gif

so
after i added this wp gallery in a new page, the sidebar shows at botton, any idea folks!

http://www.koddinn.com/myndir/

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)