Forum Moderators: open

Message Too Old, No Replies

Error Validating

Inline Element Cannot Contain a Block Level Element

         

madcat

7:05 pm on Jun 3, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi

I have my form set-up like so:

<div>
<div>
<img />
<p></p>
<div>
<form>
<input /> [color=red]//THIS IS THE PROBLEM W/ VAL[/color]
<div></div>
<div></div>
</form>
</div>
</div>
</div>

<input> is inline :: <form> is block...What do you think is the block-level element that the validator sees within an inline element? Or what is invalid about the structure above?

Maybe it's a bit clearer to someone else...
Thanks
M

[edited by: madcat at 7:06 pm (utc) on June 3, 2002]

papabaer

7:36 pm on Jun 3, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello Madcat, your form code is attempting to span multiple <div>'s - Try placing your form in a single container and check for proper tag/element nesting.

Nick_W

7:36 pm on Jun 3, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Not certain on the explanation but the fix is to wrap inputs in a div or p etc.

What's with all the redundant div's in there madcat?

Try this:

<form>
<div>
<input /> //THIS IS THE PROBLEM W/ VAL
</div>
</form>

Nick

Nick

[edited by: Nick_W at 7:38 pm (utc) on June 3, 2002]

madcat

8:09 pm on Jun 3, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hey - thanks guys.
<form> 
<div>
<input /> //THIS IS THE PROBLEM W/ VAL
</div>
</form>
Exactly : I didn't understand why I needed to wrap the <input> with <div>s though.

The <div>s within the form separate the text and <input> areas into two columns...

Maybe I'll have to come up with a better way to create this effect.

Nick_W

8:12 pm on Jun 3, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It shouldn't do. Post the code you have now and lets have a look madcat...

Nick

madcat

8:22 pm on Jun 3, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Appreciate the help Nick...in profile.

[edited by: madcat at 8:51 pm (utc) on June 3, 2002]