473,395 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

annotation doesn't float in IE

i have a very simple html doc using the following style:

<style type="text/css">
..x-note {background-color:#afeeee; margin:1ex; padding:1ex;
float:right; line-height:130%; width:60ex; clear:both;}
p {line-height:130%; width:70ex;}
</style>

typically, the <p> is main text of novels, and in between is <div
class=x-note>...</div> that are annotations floating on the right side.

My problem is that in Microsoft IE under Windows XP the annotation does
not seems to float. That is, on its left side are huge gaps of
blankness.

Firefox browser is fine as well as other browsers in Mac. (but i'm
concerned with IE as it's got ~80% users)

what could cause the problem in IE?
here's page in question:
http://xahlee.org/p/george_orwell_english.html

Thanks.

Xah
xa*@xahlee.org
∑ http://xahlee.org/

Jul 21 '05 #1
34 2571
Xah Lee wrote on 12 jul 2005 in comp.infosystems.www.authoring.stylesheets:
i have a very simple html doc using the following style:

<style type="text/css">
.x-note {background-color:#afeeee; margin:1ex; padding:1ex;
float:right; line-height:130%; width:60ex; clear:both;}
p {line-height:130%; width:70ex;}
</style>

typically, the <p> is main text of novels, and in between is <div
class=x-note>...</div> that are annotations floating on the right side.

My problem is that in Microsoft IE under Windows XP the annotation does
not seems to float. That is, on its left side are huge gaps of
blankness.

Firefox browser is fine as well as other browsers in Mac. (but i'm
concerned with IE as it's got ~80% users)

what could cause the problem in IE?
here's page in question:
http://xahlee.org/p/george_orwell_english.html


Put the <div> inside the <p></p> and not in the gap </p> <p>

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 21 '05 #2
Els
Evertjan. wrote:
Xah Lee wrote on 12 jul 2005 in comp.infosystems.www.authoring.stylesheets:
i have a very simple html doc using the following style:

<style type="text/css">
.x-note {background-color:#afeeee; margin:1ex; padding:1ex;
float:right; line-height:130%; width:60ex; clear:both;}
p {line-height:130%; width:70ex;}
</style>

typically, the <p> is main text of novels, and in between is <div
class=x-note>...</div> that are annotations floating on the right side.

My problem is that in Microsoft IE under Windows XP the annotation does
not seems to float. That is, on its left side are huge gaps of
blankness.

Firefox browser is fine as well as other browsers in Mac. (but i'm
concerned with IE as it's got ~80% users)

what could cause the problem in IE?
here's page in question:
http://xahlee.org/p/george_orwell_english.html


Put the <div> inside the <p></p> and not in the gap </p> <p>


A <div> inside a <p>? You do know that that is the end of the <p> when
you start a <div> right?

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Jul 21 '05 #3
Els
Xah Lee wrote:
i have a very simple html doc using the following style:

<style type="text/css">
.x-note {background-color:#afeeee; margin:1ex; padding:1ex;
float:right; line-height:130%; width:60ex; clear:both;}
p {line-height:130%; width:70ex;}
</style>

typically, the <p> is main text of novels, and in between is <div
class=x-note>...</div> that are annotations floating on the right side.

My problem is that in Microsoft IE under Windows XP the annotation does
not seems to float. That is, on its left side are huge gaps of
blankness. http://xahlee.org/p/george_orwell_english.html


It's because you set the width of the <p> element. IE respects that
width, and will only float the .x-note if it fits alongside a 70ex
wide p.
Solution: set the 70ex width on the body, not on the individual <p>
elements.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Jul 21 '05 #4
It's because you set the width of the <p> element. IE respects that
width, and will only float the .x-note if it fits alongside a 70ex
wide p.
Ah, that's why. Thanks! I tested with Opera and indeed Opera behaves
the same as IE.
Solution: set the 70ex width on the body, not on the individual <p>
elements.
you mean <body style="width:70ex">?

that seems to limit the entire page's width, including moving all
floats to the left so that there's nothing beyond 70ex.

Xah
xa*@xahlee.org
∑ http://xahlee.org/

Els wrote: Xah Lee wrote:
i have a very simple html doc using the following style:

<style type="text/css">
.x-note {background-color:#afeeee; margin:1ex; padding:1ex;
float:right; line-height:130%; width:60ex; clear:both;}
p {line-height:130%; width:70ex;}
</style>

typically, the <p> is main text of novels, and in between is <div
class=x-note>...</div> that are annotations floating on the right side.

My problem is that in Microsoft IE under Windows XP the annotation does
not seems to float. That is, on its left side are huge gaps of
blankness.
http://xahlee.org/p/george_orwell_english.html


It's because you set the width of the <p> element. IE respects that
width, and will only float the .x-note if it fits alongside a 70ex
wide p.
Solution: set the 70ex width on the body, not on the individual <p>
elements.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -


Jul 21 '05 #5
Els
Xah Lee wrote:
Els wrote:
Xah Lee wrote:
My problem is that in Microsoft IE under Windows XP the annotation
does not seems to float. That is, on its left side are huge gaps
of blankness.
http://xahlee.org/p/george_orwell_english.html

It's because you set the width of the <p> element. IE respects that
width, and will only float the .x-note if it fits alongside a 70ex
wide p. Solution: set the 70ex width on the body, not on the
individual <p> elements.


Ah, that's why. Thanks! I tested with Opera and indeed Opera
behaves the same as IE.
Solution: set the 70ex width on the body, not on the individual <p>
elements.


you mean <body style="width:70ex">?


Yes.
that seems to limit the entire page's width,
I thought that's what you were after?
including moving all floats to the left so that there's nothing
beyond 70ex.


If you mean that the right floats seem to be moved to the left,
they're not. They're just too wide to leave any space to the left of
them I guess?

I have no idea what you want the page to look like really, so I just
went by the way it looked in Firefox. And how that looks is entirely
dependent on the width of my browser. Is that what you're after? That
could get a bit complicated for IE really, because as soon as you set
a width or height to any container, it turns into a block in IE. For
the floats to stick out to the right, and also dependent on window
width, you would need some clever positioning.

Or do you just want the floats to be positioned to the right of the
text entirely? (which in Firefox only happens when the window is wider
than 70ex plus the width of the float)
--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Jul 21 '05 #6
i just want how it looks currently in Firefox. (or on the Mac, Safari,
Firefox/Camino, iCab).

the paragraphs should be 70 ex, left aligned. The annotation should be
60ex, and float on the right. When the window width is less than 130ex,
there the annotation should float on top of the paragraphs, and the
texts in paragraphs effectly flow around the annotation.

This is a screeshot of the desired look it Mac iCab:
http://xahlee.org/p/x.png

i didn't think this very demanding?

if i put a <body style="width:70ex">, then every content on the page is
moved inside 70ex to the left, so that there's nothing on the right
side after 70ex, regardless how large is the window. This is not
desired result....

Set your window with to 1024 pixels width...

Xah
xa*@xahlee.org
∑ http://xahlee.org/

Els wrote:
Xah Lee wrote:
Els wrote:
Xah Lee wrote:

My problem is that in Microsoft IE under Windows XP the annotation
does not seems to float. That is, on its left side are huge gaps
of blankness.

http://xahlee.org/p/george_orwell_english.html

It's because you set the width of the <p> element. IE respects that
width, and will only float the .x-note if it fits alongside a 70ex
wide p. Solution: set the 70ex width on the body, not on the
individual <p> elements.


Ah, that's why. Thanks! I tested with Opera and indeed Opera
behaves the same as IE.
Solution: set the 70ex width on the body, not on the individual <p>
elements.


you mean <body style="width:70ex">?


Yes.
that seems to limit the entire page's width,


I thought that's what you were after?
including moving all floats to the left so that there's nothing
beyond 70ex.


If you mean that the right floats seem to be moved to the left,
they're not. They're just too wide to leave any space to the left of
them I guess?

I have no idea what you want the page to look like really, so I just
went by the way it looked in Firefox. And how that looks is entirely
dependent on the width of my browser. Is that what you're after? That
could get a bit complicated for IE really, because as soon as you set
a width or height to any container, it turns into a block in IE. For
the floats to stick out to the right, and also dependent on window
width, you would need some clever positioning.

Or do you just want the floats to be positioned to the right of the
text entirely? (which in Firefox only happens when the window is wider
than 70ex plus the width of the float)
--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -


Jul 21 '05 #7
Els
Xah Lee wrote:
Els wrote:
Xah Lee wrote:
Els wrote:
Xah Lee wrote:

> http://xahlee.org/p/george_orwell_english.html

Please stop topposting, it's weird to read upside down and mixed.
Also, please snip my signature, it's not part of the message.

[setting width to body not having desired effect]
I have no idea what you want the page to look like really, so I just
went by the way it looked in Firefox. And how that looks is entirely
dependent on the width of my browser. Is that what you're after? That
could get a bit complicated for IE really, because as soon as you set
a width or height to any container, it turns into a block in IE. For
the floats to stick out to the right, and also dependent on window
width, you would need some clever positioning.
i just want how it looks currently in Firefox. (or on the Mac, Safari,
Firefox/Camino, iCab).

the paragraphs should be 70 ex, left aligned. The annotation should be
60ex, and float on the right. When the window width is less than 130ex,
there the annotation should float on top of the paragraphs, and the
texts in paragraphs effectly flow around the annotation.

This is a screeshot of the desired look it Mac iCab:
http://xahlee.org/p/x.png

i didn't think this very demanding?


It is, for IE.
The closest thing without a lot of trouble, would be setting a
margin-right on the <p> element, in percentage probably, but that
means flexible width of the <p> element too, no set width in ex.

The "clever positioning" I mentioned btw, is possible with images
floated to the left. But as the floats here are both to be floated to
the right, and also equally liquid as any other text, I'm not even
sure it's doable.
if i put a <body style="width:70ex">, then every content on the page is
moved inside 70ex to the left, so that there's nothing on the right
side after 70ex, regardless how large is the window. This is not
desired result....

Set your window with to 1024 pixels width...


You'll have to make a choice for IE:
a) have white space to the left of the floats
b) have flexible width paragraphs (either extending to the right, or
with a margin
c) have a fixed width page (either stuck to the left (ugly imo) or
centered.

(I may have forgotten some other option)

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Jul 21 '05 #8
> > i didn't think this very demanding?

It is, for IE. [and Opera, which behave different than Safari, FireFox, iCab, on a simple floating behavior of CSS]


Egad, why is technology so complexly fucked up.

I think the behavior of IE and Opera is wrong. If one wants their
current behavior of not having things floating above them, one'd put
the "clear:both".

....Thanks for the suggested workarounds anyway.

Xah
xa*@xahlee.org
∑ http://xahlee.org/

Jul 21 '05 #9
Els
Xah Lee wrote:
i didn't think this very demanding?


It is, for IE. [and Opera, which behave different than Safari, FireFox, iCab, on a simple floating behavior of CSS]


Egad, why is technology so complexly fucked up.

I think the behavior of IE and Opera is wrong.


That's just IE, really. Opera gets it right as soon as you replace
your current doctype with a Strict one:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Jul 21 '05 #10
Thanks for this great tip. I'll use it as my final workaround. (too bad
for IE on the WindowsXP...)

Xah
xa*@xahlee.org
∑ http://xahlee.org/

Els wrote:
Xah Lee wrote:
i didn't think this very demanding?

It is, for IE. [and Opera, which behave different than Safari, FireFox, iCab, on a simple floating behavior of CSS]


Egad, why is technology so complexly fucked up.

I think the behavior of IE and Opera is wrong.


That's just IE, really. Opera gets it right as soon as you replace
your current doctype with a Strict one:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -


Jul 21 '05 #11
Els
Xah Lee wrote:
Els wrote:
Xah Lee wrote:
Please pay attention to your posting. It should be at the bottom, like
you did in your previous post.
I think the behavior of IE and Opera is wrong.


That's just IE, really. Opera gets it right as soon as you replace
your current doctype with a Strict one:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">


Thanks for this great tip. I'll use it as my final workaround. (too bad
for IE on the WindowsXP...)


And for IE on any other Windows system.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Jul 21 '05 #12
Els wrote on 12 jul 2005 in comp.infosystems.www.authoring.stylesheets:
Put the <div> inside the <p></p> and not in the gap </p> <p>


A <div> inside a <p>? You do know that that is the end of the <p> when
you start a <div> right?


Did you try this in the OQ source? I did.

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 21 '05 #13
Els
Evertjan. wrote:
Els wrote on 12 jul 2005 in comp.infosystems.www.authoring.stylesheets:
Put the <div> inside the <p></p> and not in the gap </p> <p>


A <div> inside a <p>? You do know that that is the end of the <p> when
you start a <div> right?


Did you try this in the OQ source? I did.


What is 'the OQ source'? I've never heard of it. I just know you can't
put divs inside paragraphs.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Jul 21 '05 #14
Els wrote on 12 jul 2005 in comp.infosystems.www.authoring.stylesheets:
Evertjan. wrote:
Els wrote on 12 jul 2005 in comp.infosystems.www.authoring.stylesheets:
Put the <div> inside the <p></p> and not in the gap </p> <p>

A <div> inside a <p>? You do know that that is the end of the <p> when
you start a <div> right?

Did you try this in the OQ source? I did.


What is 'the OQ source'? I've never heard of it.


This is usenet: OQ = original question, the posting posted by the OP.
I just know you can't put divs inside paragraphs.


Did You try?

Of cause you can "do" it.

In the case of a floating div, it even gives a nice result.

Is it "legal"? Perhaps not.

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 21 '05 #15
Els
Evertjan. wrote:
Els wrote on 12 jul 2005 in comp.infosystems.www.authoring.stylesheets:
Evertjan. wrote:
Els wrote on 12 jul 2005 in comp.infosystems.www.authoring.stylesheets:

> Put the <div> inside the <p></p> and not in the gap </p> <p>

A <div> inside a <p>? You do know that that is the end of the <p> when
you start a <div> right?
Did you try this in the OQ source? I did.


What is 'the OQ source'? I've never heard of it.


This is usenet: OQ = original question, the posting posted by the OP.


Right. So far I've only read OP for Original Poster, as well as for
Original Post. Never heard of Original Question, but nevermind.
I just know you can't put divs inside paragraphs.


Did You try?

Of cause you can "do" it.

In the case of a floating div, it even gives a nice result.

Is it "legal"? Perhaps not.


I don't think you're understanding what I'm saying.
When you start a div, inside a paragraph, the paragraph stops right
there.

Which means, that if you use for instance this code:
<body>
<p>
<div>a floating div</div>
bla bla bla
</p>
<p>
bleep bleep
</p>

You have effectively written:
<body>
<p></p>
<div>a floating div</div>
bla bla bla
</p>
<p>
bleep bleep
</p>

Meaning 'bla bla' is directly written in the body, and will not take
the styles set for <p>.

Now I don't know what IE does in cases like this and when in
Quirksmode, but my best guess is that it follows the other browsers in
not assigning any <p> stylerules to the text after the floating div as
per the above example.

As a sidenote: Do you think that when someone is trying to get a
certain look done cross-browser, while using entirely validating HTML
and CSS, they're really looking for an invalid piece of code that only
works in IE?

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Jul 21 '05 #16
Els wrote on 12 jul 2005 in comp.infosystems.www.authoring.stylesheets:
Now I don't know what IE does in cases like this and when in
Quirksmode,
but my best guess is that it follows the other browsers in
not assigning any <p> stylerules to the text after the floating div as
per the above example.
The same, you were right there
As a sidenote: Do you think that when someone is trying to get a
certain look done cross-browser, while using entirely validating HTML
and CSS, they're really looking for an invalid piece of code that only
works in IE?


That is the problem with this NG. You [the group, not you personally] are
so fixed on "the right way", that a qiuck and dirty way to show what went
wrong, in this case that the float fell just in the empty space between two
<p>'s, was discarded for the "greater good".

However, your remark helps me to stop using <p> altogether, since this
influence by a floating or position:absolute; <div> is not sensible in my
eyes.

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 21 '05 #17
Els
Evertjan. wrote:
As a sidenote: Do you think that when someone is trying to get a
certain look done cross-browser, while using entirely validating HTML
and CSS, they're really looking for an invalid piece of code that only
works in IE?
That is the problem with this NG. You [the group, not you personally] are
so fixed on "the right way", that a qiuck and dirty way to show what went
wrong, in this case that the float fell just in the empty space between two
<p>'s,


So you're still not getting it then. If you put the div in the <p>, it
still falls in an empty space. Only this empty space is now shared
with the next paragraph that just lost it's opening tag, and therefore
is not a paragraph anymore.
was discarded for the "greater good".
You're joking, I hope? If some thing is only invalid, but works in all
browsers, I do use it. As an example: I use the underscore hack (valid
in CSS2.1, but not recognised by the CSS2 validator), and also
cursor:hand. This last one works only in IE, and is invalid code. Yet
I continue to use it, because it's the only way to get the hand on
hover over some elements sometimes in IE.

However, 99% of the time, valid code gets me where I wanna be, which
is websites that work in all browsers. It's the invalid code that
screws up for some browsers, thus diminishing the percentage of
viewers that can see my pages' content.

And that is the greater good. Especially when you're selling
something.
However, your remark helps me to stop using <p> altogether,
I'll just hope it is you and not me, cause I really don't like
"helping" people to stop using sensible markup.
since this
influence by a floating or position:absolute; <div> is not sensible in my
eyes.


"influence of a floated or absolute positioned <div> on a <p>" ?
You're never gonna understand it, are you? Nevermind. No response from
me anymore here :\

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Jul 21 '05 #18
On Tue, 12 Jul 2005, Els wrote:
If you put the div in the <p>


Impossible. In html, <div> closes any open <p>, and in xhtml would be
a validation error if the <p> has not been explicitly closed first.

This appears to be a reliable resource as to what is legal within
what, if one's having difficulty understanding the DTDs themselves:

http://www.htmlhelp.com/reference/html40/alist.html

http://www.htmlhelp.com/reference/html40/block/p.html

hope this helps
Jul 21 '05 #19
Els
Alan J. Flavell wrote:
On Tue, 12 Jul 2005, Els wrote:
If you put the div in the <p>
Impossible. In html, <div> closes any open <p>, and in xhtml would be
a validation error if the <p> has not been explicitly closed first.


That's what I was saying already :-)
This appears to be a reliable resource as to what is legal within
what, if one's having difficulty understanding the DTDs themselves:

http://www.htmlhelp.com/reference/html40/alist.html

http://www.htmlhelp.com/reference/html40/block/p.html

hope this helps


I'm afraid Evertjan doesn't want to be helped with this issue :\

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Jul 21 '05 #20
Els wrote on 12 jul 2005 in comp.infosystems.www.authoring.stylesheets:
I'm afraid Evertjan doesn't want to be helped with this issue :\


Dear Els,

don't be afraid.

It is very decent of you that you so much want to help me.

;-}

However the selfclosing of <p> is a logical abomination in HTML.

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 21 '05 #21
Els
Evertjan. wrote:
However the selfclosing of <p> is a logical abomination in HTML.


It's not. :-)

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Jul 21 '05 #22
Els wrote on 12 jul 2005 in comp.infosystems.www.authoring.stylesheets:
Evertjan. wrote:
However the selfclosing of <p> is a logical abomination in HTML.

Because it defies the principle of self susained and internally cascading
parts, that makes HTML.
It's not. :-)


Please explain your statement, beste Els.

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 21 '05 #23
Els
Evertjan. wrote:
Els wrote on 12 jul 2005 in comp.infosystems.www.authoring.stylesheets:
Evertjan. wrote:
However the selfclosing of <p> is a logical abomination in HTML.
Because it defies the principle of self susained and internally cascading
parts, that makes HTML.


Sorry, but HTML is a lot more than that.
It's not. :-)


Please explain your statement, beste Els.


Last thing then, I really don't like this thread anymore, and have no
time for it anymore either.

Someone somewhere thought up HTML. Someone somewhere decided that
block level elements can't be contained by inline elements.
Then someone invented divs to group other elements in the already
perfectly semantic markup.

Who are you (or me or anyone, nothing personal) to say that they made
the language wrong? HTML is defined so that <p> can go inside <div>,
but not vice versa. There is nothing weird or illogical about it. When
you are writing English, do you write "he readed the book" instead of
"he read the book", just because you think the grammar rules aren't
logical?

HTML is just another language with rules. I prefer to stick to them
and have browsers behave consistently when displaying my pages, than
make my own rules, which no browser knows about, and many don't
understand.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Jul 21 '05 #24
Els wrote on 13 jul 2005 in comp.infosystems.www.authoring.stylesheets:
Who are you (or me or anyone, nothing personal) to say that they made
the language wrong?
Even computer languages evolve, Els, and the direction of the evolvement
is steared by people not liking certain aspects or illogicallities of
it.
Even a computer language is not made by "they" but by "we", because we,
the users, are the customers.

Not listening to the suggestions of us, and of course only using the
"good" ones is deadly to that evolvement.
When you are writing English ...
Not a good comparison. computer languages have to be logically
constructed, both for execution and for the programmer, natural languages
don't.

Even in Dutch, or English ther are perfectly "legal" constructs a speaker
is not happy with and which he prefers not to use, because it is easier
for that person to go without.

I suggest not using the logically defunct <p> to myself and others, if
they agree.
Who are you ....
Who are you to say that that is not right?
[Just for the sake of mirror argument.
Of course you have every right to say whatever you like, Els]
Last thing then, I really don't like this thread anymore, and have no
time for it anymore either.


You surely have a some personal problem, Els,
repeatedly responding that you don't want to respond,
in stead of just not responding.

Perhaps we should speak about that, if you want?
--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 21 '05 #25
On 13 Jul 2005 09:07:05 GMT, "Evertjan." <ex**************@interxnl.net>
wrote:
Els wrote on 13 jul 2005 in comp.infosystems.www.authoring.stylesheets:
Who are you (or me or anyone, nothing personal) to say that they made
the language wrong?
[...]I suggest not using the logically defunct <p> to myself and others, if
they agree.


I'm not writing this as a defense for, or attack on, any one of you or
Els but I have followed this sub thread rather close and my conclusion
is that both of you need to read up on the history of HTML to find out
why the P element is declared the way it is today.

It actually started way back in early 1990'ies when Dan Connolly (TBL's
right hand at that time) initiated an RFC discussion at IETF (W3C as an
organization did not exist at that time) with the aim to move the
available (rather primitive) level of HTML to become a defined
application of SGML.

That work finally ended in 1995 with RFC1866 which is the standard
documentation for HTML2.0

<http://www.ietf.org/rfc/rfc1866.txt>

During that process there was quite a bit of discussion about how to
specify the original P element, in terms of SGML, so that www clients
that followed the new definition would still be able to handle all the
older documents that used a <P> tag as a paragraph start/separator.

It was shown that the SGML markup minimization rules could be allowed
for use to further declare the P element as...

<!ELEMENT P - O (%text)*>

....where the text entity is defined to contain...

<!ENTITY % text "#PCDATA | A | IMG | BR | %phrase | %font">

....where further the phrase entity is defined to contain...

<!ENTITY % phrase "EM | STRONG | CODE | SAMP | KBD | VAR | CITE ">

....and the font entity is defined to contain...

<!ENTITY % font " TT | B | I ">

....all of which effectively says that an element P can only have
repeated (%text), i.e. inline, content and that the end tag is optional.

Now an SGML parser can read an old HTML doc, where <P> tags are used as
start/separators between paragraphs, and decide that the P element
automatically ends at all places where a new block level element is
started (e.g. at a <DIV> tag or {surprise :} a new <P> tag), but
continues as it should as long as there are only inline (%text) elements
in the stream.

There is nothing "logically defunct" in that definition of the P element
in HTML, instead it is a result of a consensus among many on how to move
the original <P> tag markup into full SGML compliance without breaking
documents that was marked up before the definition was created.

Dejavue any one?

Any one of you old enough to remember the discussions we had some years
back about "doctype sniffing" and standards versus quirks modes in
clients? and why 'quirks' mode was a required client capacity in order
not to break older documents?

--
Rex
Jul 21 '05 #26
On Wed, 13 Jul 2005, Jan Roland Eriksson wrote:
Dejavue any one?


Indeed, and I've no reason to believe that today's browsers can't
render HTML/2.0, if anyone's got legacy documents around. And get
even better results by styling them with CSS, if you're willing to
take a slightly broad view of what's allowed on an HTML/2.0 <link...>
tag.

I did this for fun a few years back, and was quite amused at how well
it went. Pity I didn't keep the pages, sorry.

Be that as it may, if the hon. Usenaut wants to be stricter about
their paragraphs, they can make their own DTD which insists on
explicit opening and closing in HTML, or they can (though I don't
particularly recommend it) use XHTML where the rules of XML make this
inevitable. I don't see why the hon. Usenaut is getting so hung up on
the details of the paragraph element. If they make their private DTD
properly, then everything that validates against their own DTD would
also validate against the official HTML/4.01 (or XHTML/1.0 as the case
may be).

Jul 21 '05 #27
Alan J. Flavell wrote on 13 jul 2005 in
On Wed, 13 Jul 2005, Jan Roland Eriksson wrote:
Dejavue any one?


Indeed, and I've no reason to believe that today's browsers can't
render HTML/2.0, if anyone's got legacy documents around. And get
...


This being al very true, and than you Jan Roland for reminding us about the
history of <p>.

I would not dream [in a manner of speech only, my dreams are my own]
suggesting changing the definition of <p> and having older source change in
appearance.

That is why I suggested <p> has no place in the modern concept of html
elements that are either selfcontained like <img> or should be so <iframe>
or have a effective closing counterpart </span>.

Perhaps a new paragraph element could be defined <np> that acts more like a
block element like <div>, slowly coaching <p> into oblivion.

In the mean time, I will try changing my habitual <p>'s into <div>'s.

btw, does the inserting or the dropping of </p>'s have any consequence,
but for the view of the sourse itself?

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 21 '05 #28
Evertjan. <ex**************@interxnl.net> wrote:
I would not dream [in a manner of speech only, my dreams are my own]
suggesting changing the definition of <p> and having older source change in
appearance.

That is why I suggested <p> has no place in the modern concept of html
elements that are either selfcontained like <img> or should be so <iframe>
or have a effective closing counterpart </span>.
It's trivial to create a custom DTD that requires the closing </p> tag.
(While you're at it, you can make </td>, </tr>, </li>, etc. required, too.)
But does that resolve your issue?

Paragraphs still can't contain block-level elements (e.g., DIV), no matter
how the block-level elements are styled. And that seems to be what you're
fussing about: the fact that the parser assumes the paragraph to be closed
when a block-level element is encountered.
btw, does the inserting or the dropping of </p>'s have any consequence,
but for the view of the sourse itself?


I forget the details, but IIRC, some older browsers (including MSIE 6)
handle CSS more predictably when the optional closing tags are used.
--
Darin McGrew, mc****@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp.com, http://www.HTMLHelp.com/

key ring /'kE 'ri[ng]/ n. device enabling simultaneous loss of multiple keys
Jul 21 '05 #29
On Wed, 13 Jul 2005 22:42:38 +0100, "Alan J. Flavell"
<fl*****@ph.gla.ac.uk> wrote:
On Wed, 13 Jul 2005, Jan Roland Eriksson wrote:
Dejavue any one?
Indeed...no reason to believe that today's browsers can't
render HTML/2.0
They do, very good, all of them :)
And get even better results by styling them with CSS
if you're willing to take a slightly broad view of what's
allowed on an HTML/2.0 <link...> tag.
From RFC1866...

5.2.4. Link: LINK

The <LINK> element represents a hyperlink (see 7, "Hyperlinks").
Any number of LINK elements may occur in the <HEAD> element of
an HTML document. It has the same attributes as the <A> element
(see 5.7.3, "Anchor: A").
The <LINK> element is typically used to indicate authorship,
related indexes and glossaries, older or more recent versions,
document hierarchy, associated resources such as style sheets,
etc.

I see no reason to have a "broad view" :), it's there in black on white
that HTML/2.0 specifically allows "style sheets" to be entities that can
be linked in to the document instance.

Remember that parts of this came as a result of Haakon being at CERN at
the same time, working with friends on what would become CSS/1.0 just a
year later.

And we still have the fact that TBL's original "fund application
browser", running on his "Next" machine, did use style sheets to guide
presentation. (and that was already in 1989-90)
Be that as it may, if the hon. Usenaut wants to be stricter...


I don't think that the "hon. Usenauts" knows /exactly/ what they have
been discussing so far :)

Studies, and a full understanding, of available history would of course
remedy that situation.

--
Rex
Jul 21 '05 #30
On Thu, 14 Jul 2005, Jan Roland Eriksson wrote:
if you're willing to take a slightly broad view of what's
allowed on an HTML/2.0 <link...> tag.
From RFC1866...
Sure, but in HTML4 it's usual to specify a "type" attribute on the
link, whereas in HTML2 this attribute does not exist. So if you want
to do this strictly by the book, you give it the href= to the
stylesheet, and the rel="stylesheet", and make sure the server sends
the proper content-type of course, and then just hope the browser
developers didn't rely on the "type" attribute.
I see no reason to have a "broad view" :),
See above for what I meant by that...
it's there in black on white that HTML/2.0 specifically allows
"style sheets" to be entities that can be linked in to the document
instance.


Indeed. That's what motivated me to try it originally, really.

Those who will not learn from history are condemned to repeat it (or
something like that...)

cheers
Jul 21 '05 #31
On 13 Jul 2005 22:20:06 GMT, "Evertjan."
<ex**************@interxnl.net> wrote:
[...]
In the mean time, I will try changing my habitual <p>'s into <div>'s.

I lost track of the markup in question, but if you are marking up
actual paragraphs, then <p> is certainly preferable to <div>, since
the latter is semantically poorer.
btw, does the inserting or the dropping of </p>'s have any consequence,
but for the view of the sourse itself?


IE has an oddity in that in certain situations, it may apply a
different default bottom margin to a <p> element if it is not closed.
Take a look at this example using IE:

<http://theodorakis.net/nomargin.html>

Nick

--
Nick Theodorakis
ni**************@hotmail.com
contact form:
http://theodorakis.net/contact.html
Jul 21 '05 #32
Nick Theodorakis wrote on 14 jul 2005 in
comp.infosystems.www.authoring.stylesheets:
IE has an oddity in that in certain situations, it may apply a
different default bottom margin to a <p> element if it is not closed.
Take a look at this example using IE:

<http://theodorakis.net/nomargin.html>


Strangerder and strangerder.

If suppose I have come across that, without understanding.

;-}

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 21 '05 #33
Tim
On Wed, 13 Jul 2005 22:42:38 +0100,
"Alan J. Flavell" <fl*****@ph.gla.ac.uk> posted:
Be that as it may, if the hon. Usenaut wants to be stricter about
their paragraphs, they can make their own DTD which insists on
explicit opening and closing in HTML, or they can (though I don't
particularly recommend it) use XHTML where the rules of XML make this
inevitable.


I had wanted to check for unclosed paragraph tags without doing such
messing around, so I opted for a different approach: I installed a local
validator (the one the WDG uses), and adjusted *it's* DTDs to insist on
closed elements when checking pages.

--
If you insist on e-mailing me, use the reply-to address (it's real but
temporary). But please reply to the group, like you're supposed to.

This message was sent without a virus, please delete some files yourself.
Jul 21 '05 #34
"Underneath this lies the half-conscious belief that language is a
natural growth and not an instrument which we shape for our own
purposes."

Please consider using "that" rather than "which" in a restrictive
clause. Thanks! :-)

Jul 21 '05 #35

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ryan | last post by:
Does anyone know of a way to stop XML SPY 2004 from including the annotation data in the generated diagrams? We are trying to use it to automate the generation of our documentation from our...
2
by: SA | last post by:
Hi all, in the following situation: <xs:element name="Type"> <xs:simpleType> <xs:restriction base="xs:NMTOKEN">
0
by: Bruno Jouhier | last post by:
I have a standard Web Service developped with ASP .NET and I would like to specify annotations on some properties exposed by my web service, and to have these annotations appear in the WSDL, but I...
1
by: wayne_bradney | last post by:
I have the following Schema (XMLSchema1.xsd): <?xml version="1.0" encoding="utf-8" ?> <xs:schema id="XMLSchema1" targetNamespace="http://tempuri.org/XMLSchema1.xsd"...
0
by: robby | last post by:
I have built a DataSet and write out the xml and schema using DataSet.WriteXml() and DataSet.WriteXmlSchema(). I need to add annotations to the schema and have not been able to figure out how to...
2
by: Andreas Prilop | last post by:
Is Ruby annotation http://www.w3.org/TR/ruby/ suitable for text with musical score written with symbols from http://www.unicode.org/charts/PDF/U1D100.pdf ? -- All free men, wherever they may...
3
by: The Man From SQL | last post by:
Hi there, Here's the problem: our team is working on a web service which formerly took in two user defined types consisting of mostly simple datatypes. Recently we decided to move toward an XML...
4
by: Tony McLaughlin | last post by:
This is my first post to this ng, please bare with me if the topic is not germaine. I represent a group of investors seeking input, developer participation and open source collaboration on a...
4
by: =?Utf-8?B?cHJhZHk=?= | last post by:
Hello, I am trying to develop an application to view pdf files in ASP.net. I would need to add an annotation to the pdf files. I am trying to capture the place where the click on pdf is happening...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.