...

View Full Version : Help With Validation Errors



andynov123
06-30-2011, 11:52 PM
I'm getting these errors and can't figure out how to fix them. Any thoughts?

Line 187, Column 58: XHTML element input not allowed as child of XHTML element input in this context. (Suppressing further errors from this subtree.)
<input type="hidden" name="MAX_FILE_SIZE" value="15000" />
Contexts in which element input may be used:
Where phrasing content is expected.
Content model for element input:
Empty.

Line 190, Column 20: XHTML element div not allowed as child of XHTML element input in this context. (Suppressing further errors from this subtree.)
<div id="stitle"> stitle<br/> <input type="text" name="browse" /></div>…
Contexts in which element div may be used:
Where flow content is expected.
Content model for element input:
Empty.

Line 190, Column 82: required character (found d) (expected i)
…input type="text" name="browse" /></div></div><div id="genre">Music Genre<br />

nandahosting
06-30-2011, 11:56 PM
could you post the link for your website. thanks

andynov123
07-01-2011, 12:26 AM
<!DOCTYPE HTML>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<title></title>

<style type="text/css">

*{margin:0px; padding:0px;}


.rank {
font-size:45px;
color: #FFFFFF;

height:6%;

border-top:#000;
}


#wrapper{width:100%; margin:0px auto; background-color: #3d3d3d;}

#top { border-bottom: 1px solid #000;}
#header {
width: 100%;
height: 75px;
border: 1px solid #000000;
background-color: #000;
float:left;
color: #FFFFFF;
}
#col1{width:20%;
height:430px;
float:left;

}
#col2{width:40%;
height:430px;
float:left;
background-image:url('metal.jpg');
}
#col3{width:20%;
height:430px;

float:left;


}
#footer{width:100%;
height:100%;
clear:both;
overflow:hidden;
background-color: #000;
text-align: center;
padding-top:70px;
color: #FFFFFF;}
body{overflow-x:hidden;
overflow-y:auto;
background-color: #000;}
.buffer{
background:gray;
width:10%;
height:430px;
float:left;
}
.hhr{
display:block;
visibility:hidden;
}
#img {text-align:center;}
.col_cont{
background-image:url('metal.jpg');
border:1px solid black;
height:100%;


}
#ma{position:relative;bottom:60px;color:white;font-size:35px;font-weight:bold;}
#ratetype {font-size:35px;margin-top:10px;margin-top:-20px;position:relative;top:26px;}
#pal {position:relative;top:70px;border-bottom:solid;border-color:black;}
#col2content {text-align:center;overfloFw-x:hidden;color:white; width:99%;background-color: #00a3e8;
overflow-y:auto;height:99%; border-style:solid;border-color:black;}
.col_cont ol{
background-image:url('metal.jpg');

height:100%;
padding-left:30px;
}
#links p {border-bottom:solid;margin-top:-7px;padding-bottom:53px;font-size:28px;}
#links {font-size:28px;text-align:center;padding-top:12px;padding-bottom:8px;border-bottom:solid; margin-top:4px;}
.top{
text-align:center;font-size:25px;font-weight:bold;padding-top:10px;
}
#share {padding-top:8Px;margin-top:-38px;font-size:28px;}
.more {text-align:center;font-size:25px;padding-top:0px;margin-top:305px;width:60%; margin-left:53px;background-color: #00a3e8;border-style:solid;}
#all{margin-top:-50px;font-size:25px;text-align:center;}
A:link {text-decoration: none}
A:visited {text-decoration: none;color:black;}
A:active {text-decoration: none}
A:hover {text-decoration: none; color: white;}
# {text-align:center;position:relative;bottom:180px;font-size:22px;
}
#mininavi
{text-decoration: none; float:right;color:white;position:relative;top:35px;left:90px; }
#mininavi a:link {text-decoration: none; color:white; }
#mininavi a:visited {text-decoration: none; color:white; }
#mininavi1 a:link {text-decoration: none; color:white; }
#mininavi1 a:visited {text-decoration: none; color:white; }
#mininavi1 a:hover {text-decoration: none; color:#00a3e8; }
#mininavi a:hover {text-decoration: none; color:#00a3e8; }

#mininavi1 {float:right;color:white;position:relative;top:35px;left:210px;}
#pal {position:relative;top:70px;border-bottom:solid;border-color:black;}
#like {padding-top:35px;}
#like p {font-size:20px;}
#rtj {position:relative;bottom:73px;font-size:30px;color:white;border-bottom:solid;border-color:black;}
#browsetext{text-align:center;border-style:none;}
#browsebutton {text-align:center;font-size:17px;color:white;}
#submitbutton{font-size:25px;position:relative;top:55px;border-bottom:solid;border-color:black;padding-bottom:3px;margin-top:-45px;}
div.rank{
font-size:25px;
position:relative;bottom:10px;
padding-left:15px;


color: #000;
}
#myuploaded{position:relative;top:235px;font-size:25px;font-weight:bold;}
#welcome{color:white;float:right;padding-right:140px;padding-top:15px;}
#gre {text-align:center;position:relative;top:9px;right:4px;color:white;}
#sj{position:relative;text-align:center;color:white;top:-20px;font-size:30px;font-weight:bold;}
#rating {text-align:center;position:relative;bottom:180px;font-size:22px;
}

#col1white {font-weight:bold;background-color:white; color: #00a3e8;position:relative;bottom:288px;height:64%;border-style:solid;border-color:black;font-size:30px;text-align:center;padding-top:10px;}
ul {
text-decoration: underline;
list-style-type: none;text-align:center;padding-top:20px;font-size:25px;
}
#outnow {font-size:28px;text-align:center;padding-bottom:-28px;margin-top:54px;padding-top:-2px;}
#navi1 {text-align:center;}
div.rank ol li{
font-size:20px;



color: #000;

}
#stitle {text-align:center;color:white;padding-top:5px;}
#profile {padding-bottom:0px;margin-top:-90px;font-size:28px;position:relative;top:49px;}
#rank1{font-size:30px;}
</style>
</head>
<body>
<div id="wrapper">
<div id="header"><div id="welcome">Welcome</div><div id="mininavi"><a href="">Settings</a></div>
<div id="mininavi1"><a href="">Log Out</a></div></div>

<div id="col1"><div id="img"></div>
<div class="col_cont">
<div id="links">
<p><a href="mb.html">Link 1</a></p>



<div id="profile"> <a href="s.html">Link 2</a></div>
</div><div id="outnow"><a href="index.html">Link 3</a></div><div id="navi1"></div><hr class="hhr"/></div><div id="col1white">Like?<div id="like">



</div>
</div>
</div>

<div class="buffer"><hr class="hhr"/></div>

<div id="col2">
<div id="col2content"> <div id="myuploaded">My Uploaded</div><div id="sj">S
</div>
<form>
<div id="browsebutton">Upload <br />
<input type="file" name="uploadFile">
<input type="hidden" name="MAX_FILE_SIZE" value="15000" />


<div id="stitle">stitle<br/> <input type="text" name="browse" /></div></div><div id="gre">gre<br />


</div><div id="submitbutton"><input type="submit" value="Submit" /></div></form>
</div>

</div>

<div class="buffer"><hr class="hhr"/></div>

<div id="col3"> <div class="col_cont"> <div class="top">
Top </div>
<div class="rank">
<ul><li></li>
<li></li>
<li></li>
<li><a href=""><span>1.</span>This is line 1</a></li>
<li><a href=""><span>2.</span>This is line 2</a></li>
<li><a href=""><span>3.</span>This is line 3</a></li>
<li><a href=""><span>4.</span>This is line 4</a></li>
<li><a href=""><span>5.</span>This is line 5</a></li>
<li><a href=""><span>6.</span>This is line 6</a></li>
<li><a href=""><span>7.</span>This is line 7</a></li>
<li><a href=""><span>8.</span>This is line 8</a></li>
<li><a href=""><span>9.</span>This is line 9</a></li>
<li><a href=""><span>10.</span>This is line 10</a></li>


</ul>
</div>
<a href=""><div class="more">More</div></a>




<hr class="hhr"/>

</div>
</div>
<div id="footer">


<p>Contact Us</p>
</div>
</body>
</html>

andynov123
07-01-2011, 06:23 PM
Bump.

sunfighter
07-01-2011, 06:45 PM
To decare HTML5 you start like this:

<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<title>TITLE HERE</title>
</head>
<body>

I think they have finial released an official method, but I don't remember it. The one above will work. And it changes your errors.

The simple ones are the /> end tags your using. They are wrong and should be corrected. A search and replace will do this easily. Your first <div id="wrapper"> has no end tag.

Fix those and rerun check. Think you get No Errors.

Apostropartheid
07-01-2011, 06:56 PM
To decare HTML5 you start like this:

<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<title>TITLE HERE</title>
</head>
<body>

I think they have finial released an official method, but I don't remember it. The one above will work. And it changes your errors.

The simple ones are the /> end tags your using. They are wrong and should be corrected. A search and replace will do this easily. Your first <div id="wrapper"> has no end tag.

Fix those and rerun check. Think you get No Errors.

To clarify: don't write in XML mode if you're using HTML5 unless you have a particular reason to. It's much easier that way, as you can see.

andynov123
07-01-2011, 07:37 PM
To clarify: don't write in XML mode if you're using HTML5 unless you have a particular reason to. It's much easier that way, as you can see.

Do you mean not to add style to html file but instead link it from another page?


In regards to
The simple ones are the /> end tags your using. They are wrong and should be corrected.

I don't understand what you are referring to. Where are my page did I incorrectly use /> and what is the correct way if I'm wrong?

Where is the correct place to put the </div> for wrapper?

Apostropartheid
07-01-2011, 07:49 PM
Do you mean not to add style to html file but instead link it from another page?


In regards to

I don't understand what you are referring to. Where are my page did I incorrectly use /> and what is the correct way if I'm wrong?

Where is the correct place to put the </div> for wrapper?

If you are using HTML5 (YOU ARE, just to be clear), do not write with the XHTML syntax (like xmlns, /> &c.) Pretend it's normal HTML. This is the cause of your validation problems.

Also: if you properly indent your code, you can see errors like missing a div end tag much more easily. Have a go!

andynov123
07-01-2011, 08:29 PM
Are you saying I have to remove all /> from <img src="" alt="" />,
from browse button <input type="hidden" name="MAX_FILE_SIZE" value="15000" />, <input type="hidden" name="MAX_FILE_SIZE" value="15000" />, <hr class="hhr"/>, and <br />?

gcmax
07-01-2011, 08:58 PM
the xhtml way of declaring an image is;
<img src="image.jpg"></img>

unlike the older way;
<img src="image.jpg" />

xhtml likes elements to be closed.

Apostropartheid
07-01-2011, 09:06 PM
the xhtml way of declaring an image is;
<img src="image.jpg"></img>

unlike the older way;
<img src="image.jpg" />

xhtml likes elements to be closed.

This couldn't be more wrong.

HTML:


<img src="example.jpg" alt="">


XHTML


<img src="example.jpg" alt="" />


Remember, the alt attribute is required.

gcmax
07-02-2011, 12:28 AM
The alt attribute was omitted because I was talking about closing and yes I'm fully well aware of alt, as I presumed the op was.
Apart from that maybe you should change your comment to this couldn't be more right:thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum