...

View Full Version : UTf and validation issue inside SPAN



toplisek
05-07-2011, 10:49 AM
I have code on UTF8 pages like:



<ul>
<li>
<span>

<div style="margin: 10px 5px 0px;"></div><div style="border-style: dotted; border-width: 1px; padding: 2px 0px 2px 5px; background-color: rgb(225, 255, 230); margin-bottom: 3px;"><a href="index1.html">My index file</a></div><div style="margin:10px 5px 0px;"></div>

</span>

</li>
</ul>


I can not modify this working code. Is there solution to fix this issue?

Error message:

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

abduraooft
05-07-2011, 11:00 AM
How did you assume this as an issue with utf-8 ?

Apostropartheid
05-07-2011, 02:22 PM
The error message pretty much tells you what your issue is; have a careful read of it. This has nothing to do with UTF.

toplisek
05-07-2011, 09:16 PM
It is 50 lines coded menu and seems not to be validated. Probably I can not change to DIV as it will be mixture of my CSS code.

ANSI encoding gives error in validation even you can have 100% valid code.

UTF8 without BOM will delete hidden text.

Apostropartheid
05-07-2011, 09:42 PM
It is 50 lines coded menu and seems not to be validated. Probably I can not change to DIV as it will be mixture of my CSS code.

ANSI encoding gives error in validation even you can have 100% valid code.

UTF8 without BOM will delete hidden text.

What?

You can't have a div within a span. If you want a block level element inside of an inline one, you'll have to use CSS's display property.

toplisek
05-07-2011, 11:12 PM
I'm new to this issue.
How you connect CSS properties with SPAN as inline element and inside DIV?

If you want a block level element inside of an inline one, you'll have to use CSS's display property....

Need more info.

abduraooft
05-08-2011, 03:43 PM
Don't you just need
<ul>
<li style="margin: 5px;border: 1px dotted #000; padding: 2px 0px 2px 5px; background-color: rgb(225, 255, 230);">
<a href="index1.html">My index file</a>
</li>
</ul> ?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum