This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > December 2003 > What's acceptable for paragraphs?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author What's acceptable for paragraphs?

2003-12-13, 5:11 pm

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


Andrew Thompson

2003-12-13, 5:11 pm

<flyinabox@sbcglobal.net> wrote in message
news:UFvCb.2483$Ym5.2341@newssvr23.news.prodigy.com...
quote:

> Could someone cite some offical rule



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

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



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

>..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..
quote:

>..and others wrap it
> around a paragraph.



The <p> tag is intended to contain 'a paragraph'
so that would be appropriate.
quote:

>..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


2003-12-13, 5:11 pm

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" <andrew64@bigNOSPAMpond.com> wrote in message
news:0uxCb.50456$aT.48990@news-server.bigpond.net.au...
quote:

> <flyinabox@sbcglobal.net> wrote in message
> news:UFvCb.2483$Ym5.2341@newssvr23.news.prodigy.com...
>
> Don't know about rule so much as a standard
> or guideline.
>
>
> Well, that would have to be..
> http://www.w3.org/MarkUp/
>
>
> 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..
>
>
> The <p> tag is intended to contain 'a paragraph'
> so that would be appropriate.
>
>
> 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
>
>




Anne van Kesteren

2003-12-13, 5:11 pm

Andrew Thompson wrote:
quote:

> <flyinabox@sbcglobal.net> wrote in message
> news:UFvCb.2483$Ym5.2341@newssvr23.news.prodigy.com...
>
>
>
> Don't know about rule so much as a standard
> or guideline.
>
>
>
>
> Well, that would have to be..
> http://www.w3.org/MarkUp/
>
>
>
>
> 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?
[QUOTE][color=darkred]

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 besp of using:

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

--
Anne van Kesteren
<http://www.annevankesteren.nl/>
Andrew Thompson

2003-12-13, 5:11 pm

"Anne van Kesteren" <mail@annevankesteren.nl> wrote in message
news:bredjm$41e$1@reader11.wxs.nl...
....
quote:

> 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


Jukka K. Korpela

2003-12-13, 5:11 pm

David Dorward <dorward@yahoo.com> wrote:
quote:

> 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> </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/
Stan Brown

2003-12-13, 5:11 pm

In article <UFvCb.2483$Ym5.2341@newssvr23.news.prodigy.com> in
comp.infosystems.www.authoring.stylesheets,
<flyinabox@sbcglobal.net> wrote:
quote:

>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/
Stan Brown

2003-12-13, 5:11 pm

In article <jMyCb.199$9G2.137988197@newssvr11.news.prodigy.com> in
comp.infosystems.www.authoring.stylesheets,
<DELETEMEFIRSTflyinabox@sbcglobal.net> wrote:
quote:

>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/
Stan Brown

2003-12-13, 5:11 pm

In article <Xns945087D4D119Ajkorpelacstutfi@193.229.0.31> in
comp.infosystems.www.authoring.stylesheets, Jukka K. Korpela
<jkorpela@cs.tut.fi> wrote:
quote:

>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/
Barry Pearson

2003-12-13, 5:12 pm

Jukka K. Korpela wrote:
quote:

> David Dorward <dorward@yahoo.com> 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>. 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/


Neal

2003-12-13, 5:12 pm


<DELETEMEFIRSTflyinabox@sbcglobal.net> wrote in message
news:jMyCb.199$9G2.137988197@newssvr11.news.prodigy.com...
quote:

> 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.


Neal

2003-12-13, 5:12 pm


"Anne van Kesteren" <mail@annevankesteren.nl> wrote in message
news:bredjm$41e$1@reader11.wxs.nl...
quote:

> 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.


Neal

2003-12-13, 5:12 pm


"Jukka K. Korpela" <jkorpela@cs.tut.fi> wrote in message
news:Xns945087D4D119Ajkorpelacstutfi@193.229.0.31...
quote:

> 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> </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> </p> is silly. That should be a div.


Alan J. Flavell

2003-12-13, 5:12 pm

On Sat, 13 Dec 2003, Neal wrote:
quote:

> <DELETEMEFIRSTflyinabox@sbcglobal.net> wrote in message
> news:jMyCb.199$9G2.137988197@newssvr11.news.prodigy.com...
>
> 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.
quote:

> 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.
quote:

> 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.
Anne van Kesteren

2003-12-13, 5:12 pm

Neal wrote:
quote:

> "Anne van Kesteren" <mail@annevankesteren.nl> wrote in message
> news:bredjm$41e$1@reader11.wxs.nl...
>
>
>
> 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/>
Neal

2003-12-13, 5:12 pm

You are correct, I'm not sure what I was thinking. Applying style to
unclosed <p> elements will work. Thanks for the correction.


Neal

2003-12-13, 5:12 pm


"Anne van Kesteren" <mail@annevankesteren.nl> wrote in message
news:brfs2v$345$2@reader08.wxs.nl...
quote:

> Neal wrote:
>
> It certainly is _valid_. Read the spec for a change ;-)



How about we replace "valid" with "wise"? :)


Stan Brown

2003-12-14, 11:12 am

In article <3fdb54e6$0$14969$61fed72c@news.rcn.com> in
comp.infosystems.www.authoring.stylesheets, Neal wrote:
quote:

>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/
Spartanicus

2003-12-15, 4:35 pm

Neal wrote:
quote:

>I do agree that <p> </p> is silly. That should be a div.



Equally silly, use margins.

--
Spartanicus
Neal

2003-12-15, 4:35 pm


"Stan Brown" <the_stan_brown@fastmail.fm> wrote in message
news:MPG.1a454d13fa958fd098b956@news.odyssey.net...
quote:

> 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?sel...1fed72c%40news.
rcn.com&output=gplain


Stan Brown

2003-12-15, 4:35 pm

In article <3fdcce39$0$14963$61fed72c@news.rcn.com> in
comp.infosystems.www.authoring.stylesheets, Neal wrote:
quote:

>
>"Stan Brown" <the_stan_brown@fastmail.fm> wrote in message
>news:MPG.1a454d13fa958fd098b956@news.odyssey.net...
>
>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/
Brian

2003-12-17, 9:41 am

Spartanicus wrote:
quote:

> Neal wrote:
>
>
> 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

Spartanicus

2003-12-17, 9:41 am

Brian wrote:
quote:

>
>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?)
quote:

>Moreover, without a cleared element,
>borders (taking just one example) are not rendered around the block in
>certain browsers.



Huh? Example please.

--
Spartanicus
Brian

2003-12-17, 9:41 am

Spartanicus wrote:
quote:

> Brian wrote:
>
>
> 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.
quote:

>
> 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

Spartanicus

2003-12-17, 9:41 am

Brian wrote:
quote:

>
>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> </div>?
quote:

>
>< 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> </div> how?

--
Spartanicus
Brian

2003-12-17, 9:41 am

Spartanicus wrote:
quote:

> Brian wrote:
>
>
> And this relates to using <div> </div> how?



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

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

Spartanicus

2003-12-17, 9:41 am

Brian wrote:
quote:

>What's with the chip on your shoulder? Adding <div> </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
Tim

2003-12-17, 9:41 am

Brian wrote:
quote:



Spartanicus <me@privacy.net> wrote:
[QUOTE][color=darkred]
> 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.
Neal

2003-12-18, 8:46 pm


"Spartanicus" <me@privacy.net> wrote in message
news:1r40uv80sc5avm8d9555ve05gf7ac4p941@news.spartanicus.utvinternet.ie...
quote:

> 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?


Spartanicus

2003-12-18, 8:46 pm

Neal wrote:
quote:

>
>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
Neal

2003-12-18, 8:46 pm


"Spartanicus" <me@privacy.net> wrote in message
news:36t1uv0jm9apuuljvlpbmgot7bhqhr7mfk@news.spartanicus.utvinternet.ie...
quote:

> 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?
quote:

> 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.


Spartanicus

2003-12-18, 8:46 pm

Neal wrote:
quote:

>
>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.
quote:

>
>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
Brian

2003-12-18, 8:46 pm

Spartanicus wrote:
quote:

> Brian 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.



Multiple <br> tags are supposed to collapse; <div> elements do not
collapse. <div> </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

Brian

2003-12-18, 8:46 pm

Spartanicus wrote:
quote:

> Neal 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

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

Brian

2003-12-18, 8:46 pm

Neal wrote:
quote:

> "Spartanicus" <me@privacy.net> wrote in message
> news:36t1uv0jm9apuuljvlpbmgot7bhqhr7mfk@news.spartanicus.utvinternet.ie...
>
>
> 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

Spartanicus

2003-12-18, 8:46 pm

Brian wrote:
quote:

>
>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:
quote:

>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
Brian

2003-12-18, 8:46 pm

Spartanicus wrote:
quote:

> Brian wrote:
>
>
> 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.
quote:

> 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.)
quote:

> but I suggest that you read up on floats and adjacent margins,



I have read up on it, thanks.
quote:

> a quote from the spec

And the relevance is?
[QUOTE][color=darkred]
> I seem to remember that Moz had (has?) a bug relating to the above
> rule



So it appears.
quote:

> 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

Spartanicus

2003-12-18, 8:46 pm

Brian wrote:
quote:

>
>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
Brian

2003-12-18, 8:46 pm

Spartanicus wrote:
quote:

> Brian wrote:
>
>
> 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

Spartanicus

2003-12-18, 8:46 pm

Brian wrote:
quote:

>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
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews