Re: grid breaks with implicit div close
>IIRC a "self-closing" div tag is not valid under most XHTML DTD's where
> i have a header, footer, maincontent and rightSidebar grid. So far so
> good. Now i want to embed a YUI datatable in the maincontent area, so
> i have done this:
> <div id="yui-main">
> <div class="yui-b">
> <div class="yui-g">
> Main Content blablabla some Text....
> <div id="json"/>
> <div class="yui-b">Right Nav</div>
> In the "json" div, the table will be placed. When running this. The
> right nav will be placed under the table in the "main" area.
> But when doing the same as above but replace the json div with:
> <div id="json"></div>
> Everything works as expected. Apart from the fact that my IDE begs me
> to correct the minor problem, i dont understand where the difference
> is. Are you aware of this?
> Marc Logemann
the div element must be a "tag pair".
BTW an "implicit close" is a tag close as the result of the opening of
another tag and is distinct from a "self-closing" tag.
The pair of opening and closing tags is the correct form and should
validate. The semantics of an empty div block, however, may vary by
browser. It might be preferable to avoid empty divisions where you can
an add them dynamically when necessary.
Since your self-closing div example is not valid the results are likely
to vary by browser and DTD specified. From the results you describe it
looks like the invalid self closing div is being interpreted as a div