Forum Moderators: not2easy

Message Too Old, No Replies

Need help with placing a <div> element on page. Won't validate XHTML.

Won't validate XHTML 1.0 Please help:)

         

frenzy77

5:11 am on Jul 24, 2005 (gmt 0)

10+ Year Member



Hey guys:)

Need some help with this code. I had it checked for XHTML 1.0 validation and the validator found 3 errors. Could you help me fix this so that the <divid="box"> will be valid. It works fine but validator says it has errors such as:

ending tag "div" deleated.(not there)

</td>

forgot to close a tag.

start tag

<div id="box">

ending tag is'nt open.
</div>

It states that an element might not be allowed.

***************
>>>I'm trying to add the <div id="box"> to the code so that i can have a foreground(not sure if this is the right word.) so my text will be placed over this.<<<*******

Here's the css for the <div id="box">

#box { height: 500px;
background-color: #002868; border-bottom: 1px solid #FFFFFF; border-top: 1px solid #FFFFFF; }

And the HTML for the page.>>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1 transitional.dtd">

<html>
<head>

<title>
consol

</title>

<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />

<link rel="stylesheet" type="text/css" href="xyz.css" />

<link rel="stylesheet" type="text/css" href=abc.css" />

<link rel="stylesheet" type="text/css" href="box.css" />

</head>

<body>

<img src="logo.jpg" width="759" height="23" alt="" />

<div id="abc">

xyz
</div>

<img src="7.jpg" width="759" height="23" alt="" />
<img src="7.jpg" width="759" height="23" alt="" />

<table width="100%" cellpadding="0" cellspacing="0">

<tr>
<td valign="top" width="100">

<div id="xyz">
<ul>

<li>
<a href="index.html">Home</a>
</li>

<li>
<a href="score.html">Info</a>
</li>
<li>
<a href="score.html">Order</a>
</li>
<li>
<a href="score.html"> consolidation </a>
</li>


</ul>
</div>
</td>

<td width="575">

<div id="box">

<h1>
consol
</h1>

<p>

blah blah blah...

</p>

</td>
</tr>
</table>

</div>

</body>
</html>


Thanks guys for your help:)

frenzy77

SuzyUK

10:26 am on Jul 24, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




<!-- closing div tag should be here -->
</td>
</tr>
</table>

</div>

nesting error? from your code above the closing </div> tag should be inside the </td> table cell..

Suzy

frenzy77

11:33 am on Jul 24, 2005 (gmt 0)

10+ Year Member



Thank you sooo.... much SuzyUK!
I appreciate your help:)

My page now validates XHTML 1.0 transitional.

Thanks again!

frenzy77

g1smd

10:26 am on Jul 25, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




The simplest typos usually give the most headaches!