On Wed, 29 Aug 2007, Emanuele Venezia wrote: > I'm composing a declaration form, in which each statement is a paragraph > containing a checkbox or some radio button. I've tried to group the > radio buttons in a fieldset, which is, thus, encapsulated in a <p>. But > the text following the tag </fieldset> loses the class style of the > paragraph. Where am I wrong? Am I not allowed to include <fieldset>s in > <p>s?
This is basically a markup issue, but with significant CSS implications. By HTML syntax, a fieldset element is a block-level element, so it implicitly closes any open p element. That is, you cannot validly have a fieldset inside a p element. For practical styling, note that although <p>some text<fieldset>...</fieldset> is thus in principle equivalent to <p>some text</p><fieldset>...</fieldset> by HTML rules, the latter, fuller form is preferable. Browsers may e.g. fail to apply a margin bottom to a p element unless it has been explicitly closed with </p>. If you want to wrap some text and a fieldset inside a container block, for styling, then use <div>...</div> markup. A div element can contain both block-level and text-level elements. Beware that a div element, unlike a p element, has no default top or bottom margin. You might also consider putting the text inside the fieldset element. -- Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/ ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7 information -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
