[WSG] inline element directly on body
Hi all, maybe I should know this, but I cannot even find where does w3c refers to this, so here it goes: I have a very simple document with a strict dtd. on the body I have something like this: h1.../h1p.../pem class=nota.../em while validating the document I get this message: ___(quoting the validator) Line 15 column 18: document type does not allow element em here; missing one of p, h1, h2, h3, h4, h5, h6, div, pre, address, fieldset, ins, del start-tag . em class=nota...,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). ___ the question is:I cannot find a place where w3c tells me I cannot place an inline element directly on the body.In fact, all I find besides references about what is it, what can it contain and wich attributes it can handle, isa badexample of the well formedness concept: ___(quoting w3c)CORRECT: nested elements.phere is an emphasized emparagraph/em./pINCORRECT: overlapping elements phere is an emphasized emparagraph./p/em so,is it really mandatory thatem elements (or any inline element for that matter)should go inside block level elements, or am I missing something here? Best regards, Isabel Santos
Re: [WSG] inline element directly on body
Hi Isabel, Inline elements [1] and anonymous inline boxes [2] cannot be placed directly inside the body, form or blockquote elements when using a strict Doctype. They must be wrapped in a block level element. However, if a Transitional Doctype is used, then inline elements and anonymous inline boxes can be placed directly inside the body, form or blockquote elements. They are not required to be wrapped in block level elements. [1] http://www.w3.org/TR/REC-CSS2/visuren.html#q7 [2] http://www.w3.org/TR/REC-CSS2/visuren.html#anonymous HTH Russ so, is it really mandatory that em elements (or any inline element for that matter) should go inside block level elements, or am I missing something here? Best regards, Isabel Santos ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] inline element directly on body
Dear Isabel, As you can see from here http://www.w3.org/TR/xhtml1/diffs.html your markup is incorrect because you are attempted to use an old (html4) style (em) within a new XML based document. In XML based documents you have to use strict markup, e.g. heading: h1/h1 paragraph: p/p etc. Emphasizing some excerpt of your text should go that way as the W3C validator says: emphasized text in a paragraph: pHello emWorld/em!/p or an emphasized paragraph: pemHello World!/em/p And yes it is mandatory because e.g. XML interpreters won't understand this: phere is an emphasized emparagraph./p/em And an XHTML document has to be conformant with the XML markup. Regards, Janos PS. Sorry for my poor english :) 2005/10/23, Isabel Santos [EMAIL PROTECTED]: Hi all, maybe I should know this, but I cannot even find where does w3c refers to this, so here it goes: I have a very simple document with a strict dtd. on the body I have something like this: h1.../h1 p.../p em class=nota.../em while validating the document I get this message: ___ (quoting the validator) Line 15 column 18: document type does not allow element em here; missing one of p, h1, h2, h3, h4, h5, h6, div, pre, address, fieldset, ins, del start-tag . em class=nota..., 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). ___ the question is: I cannot find a place where w3c tells me I cannot place an inline element directly on the body. In fact, all I find besides references about what is it, what can it contain and wich attributes it can handle, is a bad example of the well formedness concept: ___ (quoting w3c) CORRECT: nested elements. phere is an emphasized emparagraph/em./p INCORRECT: overlapping elements phere is an emphasized emparagraph./p/em so, is it really mandatory that em elements (or any inline element for that matter) should go inside block level elements, or am I missing something here? Best regards, Isabel Santos ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] inline element directly on body
:) thank you Russ, I must make a w3c site map on my favorites one of this days to be able to find this things... best regards, Isabel Santos On 10/23/05, russ - maxdesign [EMAIL PROTECTED] wrote: ...Inline elements [1] and anonymous inline boxes [2] cannot be placed directlyinside the body, form or blockquote elements when using a strict Doctype. They must be wrapped in a block level element[1] http://www.w3.org/TR/REC-CSS2/visuren.html#q7[2] http://www.w3.org/TR/REC-CSS2/visuren.html#anonymousHTHRuss
Re: [WSG] inline element directly on body
2005/10/23, russ - maxdesign [EMAIL PROTECTED]: ... Inline elements [1] and anonymous inline boxes [2] cannot be placed directly inside the body, form or blockquote elements when using a strict Doctype. They must be wrapped in a block level element. ... [1] http://www.w3.org/TR/REC-CSS2/visuren.html#q7 [2] http://www.w3.org/TR/REC-CSS2/visuren.html#anonymous ... I'd say to lookup information for what can go where one should look at the corresponding DTD, in this case: http://www.w3.org/TR/html401/sgml/dtd.html which says: !ELEMENT BODY O O (%block;|SCRIPT)+ +(INS|DEL) -- document body -- (%block;|SCRIPT)+ +(INS|DEL) lists allowed elements. Plus sign at the end means that BODY must contain at least one block level or SCRIPT element. %block; entity expands to: !ENTITY % block P | %heading; | %list; | %preformatted; | DL | DIV | NOSCRIPT | BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS %heading;: !ENTITY % heading H1|H2|H3|H4|H5|H6 %list;:!ENTITY % list UL | OL %preformatted; !ENTITY % preformatted PRE Add there INS and DEL which may occur (plus sign in front) and you have list what is allowed in BODY. More info about how to read DTD: http://www.w3.org/TR/REC-html40/intro/sgmltut.html http://www.w3schools.com/dtd/default.asp http://www.alistapart.com/stories/readspec http://www.autisticcuckoo.net/archive.php?id=2005/05/01/art-of-reading-dtd Regards, Rimantas -- http://rimantas.com/ ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] inline element directly on body
Thank you all, first, with shortschedules and short weekendsI find myself looking for things I cannot find in w3c,its organization is quite confusing, and since I keep loosing bookmarks and favorite listson every format(unfortunatly too many of those) I end up getting in pannic once in a while. On those times mysynapsis tend to get slower :). Things like (quoting w3c) !ENTITY % phrase EM | STRONG | DFN | CODE | SAMP | KBD | VAR | CITE | ABBR | ACRONYM !ELEMENT (%fontstyle;|%phrase;) - - ( %inline;)* !ATTLIST (%fontstyle;|%phrase;) %attrs; -- %coreattrs, %i18n, %events -- tend to get confusing when you google it digging for a simple clear statement about your doubt, so thank you Rimantas. Janos, thank you for the tip, but I used the em element because that is what makes sense in the context, to enphasize a note as content, not only as presentation. Pardon me if I wasn't clear: I classified the w3c well formedness concept example as a bad one, not because it says anything wrong, but because it can be missunderstood; one can find this example all over the internet, as an example of how to use the em tag, but they are as poor as this example as to the issue in question: where exactly should it go. (I mean it would be wrong to make it empHello World!/p/em since em is an inline element and p is a block level one, but that isn't made clear). It seams it is very easy to find a lot of places where you learn xhtml, even where you can get diplomas on the subject, but the fact is that they do not get very deep. When one searches for more specific information, w3c turns into a labirinth, and most tutorial and reference sites into mere copies of w3c schools main content pages. Anyway, this links you all gave me deserve a good study, Thank you, best regards, Isabel Santos
[WSG] Argh! Clearing issues with center column
Hi guys, I know this isn't an easy one to crack. I've applied all the latest bleeding-edge clearing techniques but my center column's content still drops away at various widths when you resize the browser window. I'd always thought that it occurred when the 3rd column's content was higher but this is not the case. Any simple solutions that don't require a complete layout rewrite are much sought after. :) http://d81314.i50.quadrahosting.com.au/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nick Cowie Sent: Friday, 21 October 2005 6:26 PM To: wsg@webstandardsgroup.org Subject: Re: [WSG] Set min-width using DOM Paul Thankyou for that, it will be very usefull for a couple of projects I have. The current test URL is here - http://d81314.i50.quadrahosting.com.au/ - One word of warning in IE6 at about 960px wide browser window the centre content drops below the calendar. It only happens in a small range say 950 to 970 pixels wide. Which leads me to my next question. Anyone know of a calendar solution using PHP that creates clean code? I would look at the one that comes with wordpress: http://wordpress.org it does nice valid code. -- Nick Cowie http://nickcowie.com ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help ** ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
RE: [WSG] Argh! Clearing issues with center column
Yeah, I tried that first. I've now applied it to all nested containers that contain a floated DIV but the center still drops. I just can't seem to figure this out. It only occurs on some pages but I haven't been able to determine exactly what is causing it. Maybe it's HRs, or long URLs. I just don't know. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of YW Webmaster Sent: Monday, 24 October 2005 12:50 PM To: wsg@webstandardsgroup.org Subject: RE: [WSG] Argh! Clearing issues with center column Hello there, Have you tried applying the clearfix hack to a container wrapping around your whole page? I didn't test it thoroughly but it seemed to work on IE 5.5 and 6 for me. Good luck. ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help ** ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **