[ https://issues.apache.org/jira/browse/OFBIZ-3708?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12858253#action_12858253 ]
Blas Rodriguez Somoza commented on OFBIZ-3708: ---------------------------------------------- Hi Adam I agree with you here, making unneeded changes is always a bad solution. But I don't like making changes greater that those really needed, and so I don't switch to span without a reason. Of course you don't know me and so you can't know what kind of things I do. Yes, xhtml forbids a block element (like div) to be inside a inline element (like span). I attach a very simple xhtml page which contains a div inside a span and which you can test at w3c validator. Just go to http://validator.w3.org/#validate_by_input and copy and paste the following xhtml page -------------------------- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html lang="en" dir="ltr" xmlns="http://www.w3.org/1999/xhtml"> <head> <title>div span example</title> </head> <body> <span> <div> Text </div> </span> </body> </html> -------------------------- As you can see the W3C validator give you a validation error with the following text: ------------------------- Line 9, Column 7: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag 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>"). ------------------------- As you can see in the last line, putting block elements (DIV) inside a inline elements (SPAN) is not allowed. You can get a more lengthly explanation in the HTML standard sections 7.5.3 and 7.5.4 (http://www.w3.org/TR/html401/struct/global.html#h-7.5.3) What do you think now ? > Fields should be defined with span not div. (radio, date, lookup) > ----------------------------------------------------------------- > > Key: OFBIZ-3708 > URL: https://issues.apache.org/jira/browse/OFBIZ-3708 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Reporter: Blas Rodriguez Somoza > Priority: Minor > Fix For: SVN trunk > > Attachments: CAL_bizznesstime_after.jpg, CAL_bizznesstime_before.jpg, > CAL_bluelight_after.jpg, CAL_bluelight_before.jpg, > CAL_droppingcrumbs_after.jpg, CAL_droppingcrumbs_before.jpg, > CAL_flatgrey_after.jpg, CAL_flatgrey_before.jpg, CAL_tomahawk_after.jpg, > CAL_tomahawk_before.jpg, LOOKUP_CAL_bizznesstime_after.jpg, > LOOKUP_CAL_bizznesstime_before.jpg, LOOKUP_CAL_bluelight_after.jpg, > LOOKUP_CAL_bluelight_before.jpg, LOOKUP_CAL_droppingcrumbs_after.jpg, > LOOKUP_CAL_droppingcrumbs_before.jpg, LOOKUP_CAL_flatgrey_after.jpg, > LOOKUP_CAL_flatgrey_before.jpg, LOOKUP_CAL_tomahawk_after.jpg, > LOOKUP_CAL_tomahawk_before.jpg, OFBIZ-3708_framework_divspan.diff > > > Field markup should be a valid inline element. > Defining fields with div (block) instead of span (inline) creates several > problems: > - Missalignments in screen. (See LOOKUP_CAL screenshots) > - Implies a end-of-line after the div. (See CAL screenshots) > - If used inside inline elements which should be OK, becames XHTML validation > errors. (Manufacturing -> MRP -> MRP log) > Because this is a markup problem, it spans to all the themes. > This patch contains 2 files in the framework/widget area and 5 in the themes > area. > Because the source of the problem is in the framework/widget area, I opt to > assign the bug to the framework area. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira