Click to See Complete Forum and Search --> : validating html


chrismartz
04-11-2004, 01:17 PM
i am trying to validate my html with w3c but am getting errors with:
onMouseOut="this.className='level2'">
it says that Line 297, column 36: document type does not allow element "DIV" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag
what is wrong....here's a link to check out the validation yourself.... http://validator.w3.org/check?uri=http%3A%2F%2Fwww.warsaw.k12.in.us%2Fwchs%2Fhidden%2Findex.asp&charset=us-ascii+%28basic+English%29&doctype=HTML+4.01+Transitional&ss=1

also....if you can checkout http://www.warsaw.k12.in.us/wchs/hidden for me and tell me what i could change colors to and even send me a screenshot of a new color scheme it would be greatly appreciated

PeOfEo
04-11-2004, 01:30 PM
That particular error is because you have div inside of an <a>. Get rid of it, if you want to appy a text style to the link then my first suggestion would be to give it a class and play with its hover settings from there, but you can apply other settings to a link if you want.

Because you are using css to position a bunch of HRs you are getting errors. A lone HR is going to cause problems. Drop it inside of a block element or a span. Also if you have bad nesting going on. I reccomend not positioning a lot of spans but useing block elements.
<div>
<span>
</div>
</span>
the validator will go nutts.

chrismartz
04-11-2004, 01:34 PM
what do you mean exactly.....i looked over my code and all is in order...i believe

PeOfEo
04-11-2004, 01:35 PM
About the nesting was just a suggestion, I edited my post with a cause for that particular error. Just because the error message is on that line does not mean the problem is on that line, that is just where the validator is saying, wait something is wrong. Its like any debugger.

chrismartz
04-11-2004, 01:38 PM
will this take alot of work....the page works right now as is but its not valid html....what exactly will i have to do to link without the <a>

PeOfEo
04-11-2004, 02:01 PM
No, use the <a>. Why it limiting you? You can make the <a> tag act like a div its self.
<a style="display:block;">

chrismartz
04-11-2004, 04:02 PM
so how would you do this?
<a href="homework/homework.asp?id=65" target="content">
<div class="level2"
style="display:block;" onClick="changeHeight('1250')"
onMouseOver="this.className='level2A'"
onMouseOut="this.className='level2'">
<span class="l2">
Miss Lefforge
</span>
</div>
</a>

PeOfEo
04-11-2004, 04:29 PM
<a class="level2" href="homework/homework.asp?id=65" target="content"
style="display:block;" onclick="changeHeight('1250')"
onmouseover="this.className='level2A'"
onmouseout="this.className='level2'"
<span class="l2">
Miss Lefforge
</span>
</a>

Not sure if a span can go in an <a> tag, but if not just put the stuff in l2 in class level 2, merge them. Or give it an id or something.

chrismartz
04-11-2004, 05:13 PM
what would that change this to, i tried it but get a white space
<a href="mainbus.asp" target="content"
onMouseDown="writeDepartment('Business')">
<div id="d01" class="level1"
onClick="display('d01t'),changeHeight('760')"
onMouseOver="this.className='level1A'"
onMouseOut="this.className='level1'">
<img alt="" id="arrowd01" src="resource/arrow.gif" class="arrow">
<span class="l1">
Business
</span>
</div>
</a>

chrismartz
04-11-2004, 06:39 PM
i also need to validate css....is there anyone who can help?

PeOfEo
04-11-2004, 07:21 PM
turn the padding on it off. Did the stuff inside display at all?

chrismartz
04-11-2004, 07:23 PM
what do you mean by the stuff inside?

spufi
04-11-2004, 07:42 PM
Originally posted by sirhcchris3
i also need to validate css....is there anyone who can help?

I would try to renumber your z-indexes. I don't think you need THAT large of numbers.

http://www.w3.org/TR/REC-CSS2/ui.html#propdef-cursor

There's what is considered valid properties for cursor.

chrismartz
04-11-2004, 08:15 PM
peofeo, what do you mean by the stuff inside?

PeOfEo
04-11-2004, 08:33 PM
<span class="l2">
Miss Lefforge
</span>

chrismartz
04-11-2004, 09:01 PM
yes that works....when i do it with the code above that has agriculture in it....it leaves a white blank space

PeOfEo
04-11-2004, 09:08 PM
agriculture. Which code above, there is a lot of code above.

chrismartz
04-11-2004, 09:24 PM
this is what i had: <a href="mainart.asp" target="content"
onMouseDown="writeDepartment('Art')">
<div id="d00" class="level1"
onClick="display('d00t'),changeHeight('850')"
onMouseOver="this.className='level1A'"
onMouseOut="this.className='level1'">
<img alt="" id="arrowd00" src="resource/arrow.gif" class="arrow">
<span class="l1">
Art
</span>
</div>
</a>
then i changed it to: <a href="mainart.asp" target="content"
onMouseDown="writeDepartment('Art')" id="d00" class="level1"
onClick="display('d00t'),changeHeight('850')"
onMouseOver="this.className='level1A'"
onMouseOut="this.className='level1'">
<img border=0 alt="" id="arrowd00" src="resource/arrow.gif" class="arrow">
<span class="l1">
Art
</span>
</a> that is what it is now @ http://www.warsaw.k12.in.us/wchs/hidden ...as you'll notice there is a big white space and only part of art gets highlited when you scroll over it....how can i fix this? i need to do this to every one of those!:(

PeOfEo
04-11-2004, 09:31 PM
add a width:whatever]x; in to the mix.

chrismartz
04-12-2004, 08:02 AM
i did both height and width and nothing happens

chrismartz
04-12-2004, 08:46 AM
i've decided that i'll just validate it in xhtml and stick with the div's :)

PeOfEo
04-12-2004, 11:54 AM
i doubt chtml will work with those divs.

chrismartz
04-12-2004, 03:37 PM
this code is all valid in xhtml in the validator...thankfully....i'll just stick with that....how can i validate my css too? not to up on how that all works!

gizmo
04-12-2004, 04:06 PM
http://jigsaw.w3.org/css-validator/

chrismartz
04-12-2004, 07:52 PM
what is chtml? it works with xhtml my site (http://validator.w3.org/check?uri=http%3A%2F%2Fvalidator.w3.org%2Fcheck%3Furi%3Dhttp%253A%252F%252Fwww.warsaw.k12.in.us%252F wchs%252Fhidden%252F)

PeOfEo
04-12-2004, 08:01 PM
chtml == xhtml with a crazy typo.

chrismartz
04-12-2004, 08:02 PM
gotcha