By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,879 Members | 1,859 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,879 IT Pros & Developers. It's quick & easy.

What's acceptable for paragraphs?

P: n/a
Could someone cite some offical rule or documentation with regard to the <P>
tag? I've seen folks put it in between paragraphs... and others wrap it
around a paragraph. I'd think to use it effectively, it'd have to be
wrapped, correct?

Thanks,

- Michael
Jul 20 '05 #1
Share this Question
Share on Google+
40 Replies


P: n/a
<fl*******@sbcglobal.net> wrote in message
news:UF*****************@newssvr23.news.prodigy.co m...
Could someone cite some offical rule
Don't know about rule so much as a standard
or guideline.
..or documentation with regard to the <P>
tag?
Well, that would have to be..
http://www.w3.org/MarkUp/
..I've seen folks put it in between paragraphs...
That's idiotic (AFAIU). Some broswers would
ingore the empty paragraph while others would
add extra space - good if you are after a page
that renders differently on every browser..
..and others wrap it
around a paragraph.
The <p> tag is intended to contain 'a paragraph'
so that would be appropriate.
..I'd think to use it effectively, it'd have to be
wrapped, correct?


That agrees with my understanding.

Of course, I should point out that the <p>
tag is html, rather than css (i.e. stylesheets)

--
Andrew Thompson
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site
Jul 20 '05 #2

P: n/a
Thanks Andrew. And, sorry. I'd failed to point out that I was trying to
understand the <p> tag in relation to using it with a CSS class or ID.

Regards,

- Michael

"Andrew Thompson" <an******@bigNOSPAMpond.com> wrote in message
news:0u******************@news-server.bigpond.net.au...
<fl*******@sbcglobal.net> wrote in message
news:UF*****************@newssvr23.news.prodigy.co m...
Could someone cite some offical rule


Don't know about rule so much as a standard
or guideline.
..or documentation with regard to the <P>
tag?


Well, that would have to be..
http://www.w3.org/MarkUp/
..I've seen folks put it in between paragraphs...


That's idiotic (AFAIU). Some broswers would
ingore the empty paragraph while others would
add extra space - good if you are after a page
that renders differently on every browser..
..and others wrap it
around a paragraph.


The <p> tag is intended to contain 'a paragraph'
so that would be appropriate.
..I'd think to use it effectively, it'd have to be
wrapped, correct?


That agrees with my understanding.

Of course, I should point out that the <p>
tag is html, rather than css (i.e. stylesheets)

--
Andrew Thompson
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site

Jul 20 '05 #3

P: n/a
Andrew Thompson wrote:
<fl*******@sbcglobal.net> wrote in message
news:UF*****************@newssvr23.news.prodigy.co m...
Could someone cite some offical rule

Don't know about rule so much as a standard
or guideline.

..or documentation with regard to the <P>
tag?

Well, that would have to be..
http://www.w3.org/MarkUp/

..I've seen folks put it in between paragraphs...

That's idiotic (AFAIU).


Isn't that perfectly valid HTML?

<p>Paragraph
<p>Paragraph
etc.

Since the browser needs to close it for you in HTML?
..I'd think to use it effectively, it'd have to be
wrapped, correct?


As I said, this isn't required for HTML, the browser will close it for
you, though if you want to make sure _every_ browser understands it (and
it is more future compatible) you are best of using:

<p>Paragraph</p>
<p>Paragraph</p>
etc.

--
Anne van Kesteren
<http://www.annevankesteren.nl/>
Jul 20 '05 #4

P: n/a
"Anne van Kesteren" <ma**@annevankesteren.nl> wrote in message
news:br**********@reader11.wxs.nl...
....
As I said, this isn't required for HTML, the browser will close it for
you, though if you want to make sure _every_ browser understands it .....


I'll choose to entirely ignore the technical
correctness of what you write, in order to quip..

<utter sarcasm>
NOOO! I actually want to reject every 20th
or so visitor based purely on their choice (or
sometimes not _their_ choice) of browser!
</utter sarcasm> ;-)

--
Andrew Thompson
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site
Jul 20 '05 #5

P: n/a
fl*******@sbcglobal.net wrote:
Could someone cite some offical rule or documentation with regard to the
<P> tag? I've seen folks put it in between paragraphs... and others wrap
it around a paragraph.


If you are writing HTML that accurately describes a document, then all
paragraphs must be marked up as a <p> element.

In HTML a <p> element begins when the parser hits a <p> tag and ends when it
hits either a </p> tag OR a tag which can not occur in a paragraph (such as
a <p> tag or a <table> tag). This is because in HTML the closing tag for a
paragraph is optional.

In XHTML there are no optional closing tags, so the </p> tag is required.

Even in HTML its better to closing tags all the time as it makes it easier
to spot mistakes, and for potential future migration to XHTML.

--
David Dorward <http://dorward.me.uk/>
Jul 20 '05 #6

P: n/a
David Dorward <do*****@yahoo.com> wrote:
If you are writing HTML that accurately describes a document, then
all paragraphs must be marked up as a <p> element.


And _only_ paragraphs. It is relatively common to use paragraph markup
for short greetings, like <p>Welcome to Our Cool Site!!!</p>, which
would better be marked up as <div>. It's of course somewhat debatable
what constitutes a paragraph, but I would say that it normally consists
of two or more sentences (full sentences, with predicates). And one
often sees <p>&nbsp;</p>, usually generated by clueless authoring
software, which sure aren't paragraphs but just attempts to create some
empty space, or something.

From the CSS point of view, the important thing is that if you use
markup like

<h2>heading</h2>
text1
<p>
text2
<p>
text3

which is still fairly common*), then text1 is not a p element and no
rules for p apply to it. It's just text content, probably inside <body>
only, and styling it is rather difficult.

*) Originally, in pre-HTML 2.0 unofficial drafts and descriptions, <p>
was specifically a paragraph separator, and no </p> tag was even
allowed. It was changed to a tag that starts a container element, which
will terminate either implicitly or with </p>, in HTML 2.0, and that's
how things have always been in HTML (until XHTML even made an explicit
</p> obligatory). But people _still_ use <p> the old way. This probably
reflects a wrong view on markup more than anything else - but when
using CSS, you _must_ learn to think in terms of elements, not
separators.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #7

P: n/a
In article <UF*****************@newssvr23.news.prodigy.com> in
comp.infosystems.www.authoring.stylesheets,
<fl*******@sbcglobal.net> wrote:
Could someone cite some offical rule or documentation with regard to the <P>
tag? I've seen folks put it in between paragraphs... and others wrap it
around a paragraph. I'd think to use it effectively, it'd have to be
wrapped, correct?


This is not a style-sheet question, but an HTML one. I've redirected
followups appropriately.

The correct markup for a paragraph is
<p>paragraph text</p>

However, browsers are supposed to treat
<p>
paragraph text
</p>
identically to the above, and the closing </p> tag is optional. Thus
you end up with correct markup that looks like <p> between
paragraphs instead of <p>...</p> surrounding paragraphs.

Of course if you mean literally "between paragraphs" then you'd be
missing the <p> before the first paragraph of the document; first
paragraph after every <h1>, <h2>, etc. heading; first paragraph
after any </ol> or </ul> or </dl>; first paragraph after any
</table> or </pre>, and so forth.

While those <p> tags are required, it's usually not too obvious if
you omit them, unless you're using style sheets to specify
paragraph format. If you are using a style sheet, the "paragraphs"
that don't actually begin with <p> tags will be styled differently
from the ones that do.

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #8

P: n/a
In article <jM*********************@newssvr11.news.prodigy.co m> in
comp.infosystems.www.authoring.stylesheets,
<DE********************@sbcglobal.net> wrote:
Thanks Andrew. And, sorry. I'd failed to point out that I was trying to
understand the <p> tag in relation to using it with a CSS class or ID.

[followed by the previous article]

makes it harder to follow discussions.
before the material you're commenting on, it
When you put your comments

http://oakroadsystems.com/genl/unice.htm#upside

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #9

P: n/a
In article <Xn*****************************@193.229.0.31> in
comp.infosystems.www.authoring.stylesheets, Jukka K. Korpela
<jk******@cs.tut.fi> wrote:
And _only_ paragraphs. It is relatively common to use paragraph markup
for short greetings, like <p>Welcome to Our Cool Site!!!</p>, which
would better be marked up as <div>.


Why would it be better marked up as div? It's a paragraph, isn't it?

I can see giving it a class (or even an ID), but making it div
instead of paragraph? Why do you suggest that.

(Followups set appropriately for this HTML question.)

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #10

P: n/a
Jukka K. Korpela wrote:
David Dorward <do*****@yahoo.com> wrote:
If you are writing HTML that accurately describes a document, then
all paragraphs must be marked up as a <p> element.


And _only_ paragraphs. It is relatively common to use paragraph markup
for short greetings, like <p>Welcome to Our Cool Site!!!</p>, which
would better be marked up as <div>. It's of course somewhat debatable
what constitutes a paragraph, but I would say that it normally
consists of two or more sentences (full sentences, with predicates).

[snip]

What would you do with (say):

<td>
One sentence.

A few sentences.
</td>

The "A few sentences." is a paragraph. I normally then mark-up the "One
sentence." as a paragraph too, because it appears wrong to consider the 2
pieces of text to be different "things". (And I rarely find that a "2 or more"
rule is plausible).

Note - "paragraph" comes from early Greek, and meant a small written mark
denoting a change of sense. In other words, it was genuine mark-up a long time
ago, and *between* pieces of text. Like early HTML! So we don't appear to be
able to rely upon the natural-language use of "paragraph" to decide how to use
it in HTML. HTML has gone off in its own direction, and it is hard to pin down
the HTML-specific rules.

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #11

P: n/a

<DE********************@sbcglobal.net> wrote in message
news:jM*********************@newssvr11.news.prodig y.com...
Thanks Andrew. And, sorry. I'd failed to point out that I was trying to
understand the <p> tag in relation to using it with a CSS class or ID.


To apply style you must use the closing </p>. Style can only be applied to
content contained in markup, and a single <p>, while it will normally work
as a paragraph break, cannot by itself determine what content you want.
Jul 20 '05 #12

P: n/a

"Anne van Kesteren" <ma**@annevankesteren.nl> wrote in message
news:br**********@reader11.wxs.nl...
Isn't that perfectly valid HTML?

<p>Paragraph
<p>Paragraph
etc.

Since the browser needs to close it for you in HTML?


I can leave the toilet seat up too, as she has to put it down anyway when
she uses it. But, as with not putting in closing tags, that can lead to
wildly unpredictable results.

It might work, but that doesn't make it valid.
Jul 20 '05 #13

P: n/a

"Jukka K. Korpela" <jk******@cs.tut.fi> wrote in message
news:Xn*****************************@193.229.0.31. ..
And _only_ paragraphs. It is relatively common to use paragraph markup
for short greetings, like <p>Welcome to Our Cool Site!!!</p>, which
would better be marked up as <div>. It's of course somewhat debatable
what constitutes a paragraph, but I would say that it normally consists
of two or more sentences (full sentences, with predicates). And one
often sees <p>&nbsp;</p>, usually generated by clueless authoring
software, which sure aren't paragraphs but just attempts to create some
empty space, or something.


I disagree on the one-sentence paragraph - any text can be considered a
paragrasph so long as it is not more meaningfully defined as a list, a
header, etc. div is a meaningless tag, essentially, and in and of itself
does nothing to explain the function of the content to the browser.

I do agree that <p>&nbsp;</p> is silly. That should be a div.
Jul 20 '05 #14

P: n/a
On Sat, 13 Dec 2003, Neal wrote:
<DE********************@sbcglobal.net> wrote in message
news:jM*********************@newssvr11.news.prodig y.com...
Thanks Andrew. And, sorry. I'd failed to point out that I was trying to
understand the <p> tag in relation to using it with a CSS class or ID.
To apply style you must use the closing </p>.

^^^^?

Where did you dream that up from? The DTD determines whether an
explicit closing tag is required. It has nothing to do with CSS, in
theory. If the paragraph is implicit, then a style that is defined
for the p element is still just as applicable to the text as if the
paragraph had been marked explicitly. In theory, anyway.
Style can only be applied to content contained in markup,
Again, the DTD is the final arbiter of this, as far as theory is
concerned. The following document:

<title>Foo</title>
Bar

is, in most versions of HTML, a complete and valid HTML document:
taken together with its DOCTYPE, it will pass formal validation. You
might want to try it out at
http://www.htmlhelp.com/cgi-bin/validate.cgi for example.

Congratulations, no errors!
Input

1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
3
4 <title>foo</title>
5 Bar

According to the Transitional specification, it's exactly equivalent
to

<html>
<head>

<title>Foo</title>
</head>
<body>
<p>Bar</p>
</body>
</html>

It's true that NN4 in particular, and some other browsers to some
extent also, failed to implement the specifications properly, and
better results can therefore be achieved in practice by including all
optional tags. So you could certainly _recommend_ explict tags
everywhere, but by saying "must" you seem to imply that you think it's
a mandatory requirement, which it isn't - in general.

"Strict" forces you to be more explicit in various ways, but some
elements can still be opened and/or closed implicitly.
and a single <p>, while it will normally work as a paragraph break,
cannot by itself determine what content you want.


What version of HTML do you suppose that you're describing here?
A paragraph can, in theory, be closed implicitly, even in "Strict"
HTML4.01:

Congratulations, no errors!
Input

1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
2
3 <title>Foo</title>
4 <p>bar

The reason for recommending the closing of elements explicitly is not
that the HTML rules require it, but that client agents have been very
patchy in implementing those rules correctly.

XHTML is rather different, for sure.
Jul 20 '05 #15

P: n/a
Neal wrote:
"Anne van Kesteren" <ma**@annevankesteren.nl> wrote in message
news:br**********@reader11.wxs.nl...
Isn't that perfectly valid HTML?

<p>Paragraph
<p>Paragraph
etc.

Since the browser needs to close it for you in HTML?

I can leave the toilet seat up too, as she has to put it down anyway when
she uses it. But, as with not putting in closing tags, that can lead to
wildly unpredictable results.

It might work, but that doesn't make it valid.


It certainly is _valid_. Read the spec for a change ;-)

Valid HTML 4.01 Strict example, with minimal markup: <http://delete.me.uk/>

--
Anne van Kesteren
<http://www.annevankesteren.nl/>
Jul 20 '05 #16

P: n/a
You are correct, I'm not sure what I was thinking. Applying style to
unclosed <p> elements will work. Thanks for the correction.
Jul 20 '05 #17

P: n/a

"Anne van Kesteren" <ma**@annevankesteren.nl> wrote in message
news:br**********@reader08.wxs.nl...
Neal wrote:
It might work, but that doesn't make it valid.


It certainly is _valid_. Read the spec for a change ;-)


How about we replace "valid" with "wise"? :)
Jul 20 '05 #18

P: n/a
In article <3f***********************@news.rcn.com> in
comp.infosystems.www.authoring.stylesheets, Neal wrote:
To apply style you must use the closing </p>. Style can only be applied to
content contained in markup, and a single <p>, while it will normally work
as a paragraph break, cannot by itself determine what content you want.


Could you please enlighten me by citing the section of the CSS spec
from which you conclude that
<p class="a">text</p>
<p>
and
<p class="a">text
<p>
are supposed to be treated any differently. This rule is quite
unknown to me.

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #19

P: n/a
Neal wrote:
I do agree that <p>&nbsp;</p> is silly. That should be a div.


Equally silly, use margins.

--
Spartanicus
Jul 20 '05 #20

P: n/a

"Stan Brown" <th************@fastmail.fm> wrote in message
news:MP************************@news.odyssey.net.. .
Could you please enlighten me by citing the section of the CSS spec
from which you conclude that


No, but I gladly enlighten you to a recent post where I admit I was in
error.

http://groups.google.com/groups?selm...1fed72c%40news.
rcn.com&output=gplain
Jul 20 '05 #21

P: n/a
In article <3f***********************@news.rcn.com> in
comp.infosystems.www.authoring.stylesheets, Neal wrote:

"Stan Brown" <th************@fastmail.fm> wrote in message
news:MP************************@news.odyssey.net. ..
Could you please enlighten me by citing the section of the CSS spec
from which you conclude that


No, but I gladly enlighten you to a recent post where I admit I was in
error.


"Spoke like a gentleman, sir!"

When I posted my comment, your retraction had not yet reached my
site.

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #22

P: n/a
Spartanicus wrote:
Neal wrote:
I do agree that <p>&nbsp;</p> is silly. That should be a div.


Equally silly, use margins.


I'll confess to using it to ensure that a block level element whose
contents are floated is given vertical space in the rendering.
Margins do not always work, since the floated element is taken out of
the normal document flow. Moreover, without a cleared element,
borders (taking just one example) are not rendered around the block in
certain browsers.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #23

P: n/a
Brian wrote:
I do agree that <p>&nbsp;</p> is silly. That should be a div.
Equally silly, use margins.


I'll confess to using it to ensure that a block level element whose
contents are floated is given vertical space in the rendering.
Margins do not always work, since the floated element is taken out of
the normal document flow.


You want to float an element and ensure that the content that follows
next is positioned beneath the float? (then why float?)
Moreover, without a cleared element,
borders (taking just one example) are not rendered around the block in
certain browsers.


Huh? Example please.

--
Spartanicus
Jul 20 '05 #24

P: n/a
Spartanicus wrote:
Brian wrote:
I do agree that <p>&nbsp;</p> is silly. That should be a div.

Equally silly, use margins.


I'll confess to using it to ensure that a block level element
whose contents are floated is given vertical space in the
rendering. Margins do not always work, since the floated element
is taken out of the normal document flow.


You want to float an element and ensure that the content that
follows next is positioned beneath the float? (then why float?)


No. (Where did you get that idea?) I want to float an element, and
set a margin between it and whatever element comes below it.
Moreover, without a cleared element, borders (taking just one
example) are not rendered around the block in certain browsers.


Huh? Example please.


< http://www.tsmchughs.com/menus/dinner-float-test >
View it in MSIE 5.0/Win2k. Compare with
< http://www.tsmchughs.com/menus/dinner >

--
Brian
follow the directions in my address to email me

Jul 20 '05 #25

P: n/a
Brian wrote:
> I do agree that <p>&nbsp;</p> is silly. That should be a div.

Equally silly, use margins.

I'll confess to using it to ensure that a block level element
whose contents are floated is given vertical space in the
rendering. Margins do not always work, since the floated element
is taken out of the normal document flow.


You want to float an element and ensure that the content that
follows next is positioned beneath the float? (then why float?)


No. (Where did you get that idea?) I want to float an element, and
set a margin between it and whatever element comes below it.


I still don't follow, why would that require something as silly as
<div>&nbsp;</div>?
Moreover, without a cleared element, borders (taking just one
example) are not rendered around the block in certain browsers.


Huh? Example please.


< http://www.tsmchughs.com/menus/dinner-float-test >
View it in MSIE 5.0/Win2k. Compare with
< http://www.tsmchughs.com/menus/dinner >


And this relates to using <div>&nbsp;</div> how?

--
Spartanicus
Jul 20 '05 #26

P: n/a
Spartanicus wrote:
Brian wrote:
Moreover, without a cleared element, borders (taking just one
example) are not rendered around the block in certain browsers.

Huh? Example please.


< http://www.tsmchughs.com/menus/dinner-float-test >
View it in MSIE 5.0/Win2k. Compare with
< http://www.tsmchughs.com/menus/dinner >


And this relates to using <div>&nbsp;</div> how?


What's with the chip on your shoulder? Adding <div>&nbsp;</div> and
clearing that div will change the borders.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #27

P: n/a
Brian wrote:
What's with the chip on your shoulder? Adding <div>&nbsp;</div> and
clearing that div will change the borders.


Possibly, and <br><br><br><br><br> will create vertical space, both are
bad coding practices, and that is what is being pointed out here.

--
Spartanicus
Jul 20 '05 #28

P: n/a
Tim
Brian wrote:
What's with the chip on your shoulder? Adding <div>&nbsp;</div> and
clearing that div will change the borders.


Spartanicus <me@privacy.net> wrote:
Possibly, and <br><br><br><br><br> will create vertical space, both are
bad coding practices, and that is what is being pointed out here.


I notice that Lynx has an option to treat multiple <br> elements as a
single one. Quite useful at dealing with crappily authored sites.

--
My "from" address is totally fake. The reply-to address is real, but
may be only temporary. Reply to usenet postings in the same place as
you read the message you're replying to.

This message was sent without a virus, please delete some files yourself.
Jul 20 '05 #29

P: n/a

"Spartanicus" <me@privacy.net> wrote in message
news:1r********************************@news.spart anicus.utvinternet.ie...
Possibly, and <br><br><br><br><br> will create vertical space, both are
bad coding practices, and that is what is being pointed out here.


Then what do you recommend an author do when he's floating something and
wants more space under the float before the other element begins to wrap
under it?
Jul 20 '05 #30

P: n/a
Neal wrote:
Possibly, and <br><br><br><br><br> will create vertical space, both are
bad coding practices, and that is what is being pointed out here.


Then what do you recommend an author do when he's floating something and
wants more space under the float before the other element begins to wrap
under it?


Specify a margin.

Btw, elements don't wrap.

--
Spartanicus
Jul 20 '05 #31

P: n/a

"Spartanicus" <me@privacy.net> wrote in message
news:36********************************@news.spart anicus.utvinternet.ie...
Specify a margin.
Prev poster says sometimes that is not to be relied on. It's likely common
knowledge I'm just learning this layout thing, so are you saying it can be
counted on?
Btw, elements don't wrap.


My error is likely one of terminology. One good reason to float is so that
content can eventually flow under the floated element, as in a photo inset
into a column of text. But I'm sure you know that.

That's the phenomenon I was referring to.
Jul 20 '05 #32

P: n/a
Neal wrote:
Specify a margin.


Prev poster says sometimes that is not to be relied on.


Back up in the thread a bit and you'll notice that he did not back up
that claim when asked.
Btw, elements don't wrap.


My error is likely one of terminology. One good reason to float is so that
content can eventually flow under the floated element, as in a photo inset
into a column of text. But I'm sure you know that.

That's the phenomenon I was referring to.


Right, content can wrap.

--
Spartanicus
Jul 20 '05 #33

P: n/a
Spartanicus wrote:
Brian wrote:
What's with the chip on your shoulder? Adding <div>&nbsp;</div> and
clearing that div will change the borders.


Possibly, and <br><br><br><br><br> will create vertical space, both are
bad coding practices, and that is what is being pointed out here.


Multiple <br> tags are supposed to collapse; <div> elements do not
collapse. <div>&nbsp;</div> is not ideal, but it's more likely to get
you a margin when items are floated.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #34

P: n/a
Spartanicus wrote:
Neal wrote:
Specify a margin.


Prev poster says sometimes that is not to be relied on.


Back up in the thread a bit and you'll notice that he did not back up
that claim when asked.


Here you go, Spartanicus:

http://www.tsmchughs.com/test/float-margin

http://www.tsmchughs.com/test/float-margin-with-div

--
Brian
follow the directions in my address to email me

Jul 20 '05 #35

P: n/a
Neal wrote:
"Spartanicus" <me@privacy.net> wrote in message
news:36********************************@news.spart anicus.utvinternet.ie...
Specify a margin.


Prev poster says sometimes that is not to be relied on.


Only in certain circumstances. I've found it difficult to set a
margin between 2 groups of floated items. Use the margin property to
set a margin. Use <div>nbsp;</div> only to clear the document flow if
you're running into problems.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #36

P: n/a
Brian wrote:
Back up in the thread a bit and you'll notice that he did not back up
that claim when asked.
Here you go, Spartanicus:

http://www.tsmchughs.com/test/float-margin

http://www.tsmchughs.com/test/float-margin-with-div


It's common courtesy to make a minimized test case if you want others to
look at your code. I don't have the time to traverse through non
minimized code, but I suggest that you read up on floats and adjacent
margins, a quote from the spec:
The margins of floating boxes never collapse with margins of adjacent boxes.


I seem to remember that Moz had (has?) a bug relating to the above rule,
trying to circumvent that bug by introducing superfluous html is a
fundamentally flawed strategy.

--
Spartanicus
Jul 20 '05 #37

P: n/a
Spartanicus wrote:
Brian wrote:
Back up in the thread a bit and you'll notice that he did not
back up that claim when asked.
http://www.tsmchughs.com/test/float-margin
http://www.tsmchughs.com/test/float-margin-with-div


It's common courtesy to make a minimized test case if you want
others to look at your code.


I don't want others to look at my code. You stated that I "did not
back up that claim." Now I have.
I don't have the time to traverse through non minimized code
Noone is asking you to.

(I solved that margin problem some time ago. I once had a border
problem related to floats; I solved that, too.)
but I suggest that you read up on floats and adjacent margins,
I have read up on it, thanks.
a quote from the spec
The margins of floating boxes never collapse with margins of
adjacent boxes.

And the relevance is?
I seem to remember that Moz had (has?) a bug relating to the above
rule
So it appears.
trying to circumvent that bug by introducing superfluous html is a
fundamentally flawed strategy.


I cannot find a better way to cicumvent this bug. And I consider
<div>&nbps;</div> relatively harmless.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #38

P: n/a
Brian wrote:
trying to circumvent that bug by introducing superfluous html is a
fundamentally flawed strategy.


I cannot find a better way to cicumvent this bug.


Unless you are a programmer working on Gecko, you shouldn't attempt to,
it's not an content author problem. Striving for pixel identical
rendering across browsers is a flawed pursuit, especially on something
so trivial as a margin.

--
Spartanicus
Jul 20 '05 #39

P: n/a
Spartanicus wrote:
Brian wrote:
trying to circumvent that bug by introducing superfluous html
is a fundamentally flawed strategy.


I cannot find a better way to cicumvent this bug.


Striving for pixel identical rendering across browsers is a flawed
pursuit, especially on something so trivial as a margin.


I don't strive for pixel identical rendering. I sometimes want a
margin, however. Sometimes, I even want a border.

P.S. Your interest in my authoring habits is curious.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #40

P: n/a
Brian wrote:
P.S. Your interest in my authoring habits is curious.


I couldn't care less about your authoring habits. I do care about bad
authoring practice being advocated.

--
Spartanicus
Jul 20 '05 #41

This discussion thread is closed

Replies have been disabled for this discussion.