Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Floating objects.

Reply
Thread Tools

Floating objects.

 
 
Andrew Fedoniouk
Guest
Posts: n/a
 
      08-07-2003
<CITE src="http://www.w3.org/TR/html401/present/graphics.html#h-15.1.3">
15.1.3 Floating objects
Images and objects may appear directly "in-line" or may be floated to one
side of the page, temporarily altering the margins of text that may flow on
either side of the object.
</CITE>

What does it mean "text" and "margins of text" here?

Can I describe text as sequence of words taken from consequent paragraphs,
where paragraph boundaries just sort of LF or <BR> ?

If yes, I believe that results of rendering of the following:

http://blocknote.net/tests/30.htm is just wrong for IE, NS, Opera and Amaya.

If now, what does text mean exactly? Could somebody point on formal
description?

And I guess that "floated to one side of the page" is not a case anymore.

Are these problems of non-deterministic standard or rather existing
browsers?

Could somebody shed a light on this part of standard?

Thanks in advance.

Andrew Fedoniouk.
http://terra-informatica.org
http://blocknote.net





 
Reply With Quote
 
 
 
 
Chris Beall
Guest
Posts: n/a
 
      08-08-2003
"Andrew Fedoniouk" <(E-Mail Removed)> wrote in message
news:GrBYa.56989$(E-Mail Removed) ...
> <CITE

src="http://www.w3.org/TR/html401/present/graphics.html#h-15.1.3">
> 15.1.3 Floating objects
> Images and objects may appear directly "in-line" or may be floated to

one
> side of the page, temporarily altering the margins of text that may

flow on
> either side of the object.
> </CITE>
>
> What does it mean "text" and "margins of text" here?


Text is the visible words. They are displayed within established
margins. In your first paragraph, you have specified width=50%. That
establishes the margins within which the text will be displayed.

> Can I describe text as sequence of words taken from consequent

paragraphs,
> where paragraph boundaries just sort of LF or <BR> ?


Not exactly. A paragraph starts with <p> and ends with the start of the
next block element, which could be another <p> or something else.
Although it is not required to end a paragraph with </p>, it is good
practice to do so. <br> does not end a paragraph, nor does LF in the
source.

> If yes, I believe that results of rendering of the following:
>
> http://blocknote.net/tests/30.htm is just wrong for IE, NS, Opera and

Amaya.

See below.

> If now, what does text mean exactly? Could somebody point on formal
> description?


Section 9.2.2 of the CSS2 specification, at
http://www.w3.org/TR/REC-CSS2/visuren.html#q7, is probably what you
want, but it won't make much sense out of context.

> And I guess that "floated to one side of the page" is not a case

anymore.

Better wording would have been "floated TOWARD one side of the page".
It floats TO the current MARGIN, which may not be at the page edge (and
isn't in your test case.)

Also, the recommended method for requesting a float has changed (note
that the HTML align="right" is shown as a DEPRECATED example in the
paragraph you refer to, meaning there is now a better way, using CSS).
Still, the old way should work.

> Are these problems of non-deterministic standard or rather existing
> browsers?


The folks who wrote the standard intend it to be deterministic, up to a
point, beyond which they usually say 'is outside the scope of this
specifiecation". Sometimes they aren't as clear as needed; sometimes
implementors don't read carefully enough.

> Could somebody shed a light on this part of standard?


Here's what I see:
- In IE 5.5 for Windows, the words 'one two three' appear together in
the upper left corner of the bordered <p> block, as expected. The image
appears against the right margin of that block, also as expected, since
the image is logically (at the time of the HTML 4.01 spec) INSIDE the
paragraph, but has been floated to the right. The top of the image is
positioned one line down from the top of the block. The spec says
"Floating objects generally begin a new line.", so that's consistent.
The second paragraph has no specified width, so the viewport (window)
width is used, thus the paragraph block extends clear across the page
and contains the text, as expected.
So, I think IE 5.5 does what you asked, as its developers interpreted
the spec.

- In Netscape 7.1, the results are different. The first paragraph box
is only one line high, containing the three words, and 50% of the screen
width. That's fine.
The floated image appears next (moving downward), in the same location
as for IE, but it is outside the bordered paragraph box, i.e. it has
been removed from the 'Normal' flow, (using CSS terminology), and
floated to the right margin (previously established by the paragraph
width).
Next comes the second paragraph box, which extends clear across the
page again, slipping UNDER the image. The text itself, however, cannot
pass the new right margin defined by the left side of the image, so it
spills to a second line.
So Netscape did the right thing too, just using a slightly newer
definition of 'right'.

The problem is twofold:
First, things change. One standard gets partially obsoleted by
another. Descriptions are clarified in response to incorrect browser
implementations.
Second, there are ambiguities in any communication. The W3C folks try
to be crisp, but there are economic pressures on browser developers to
deliver products quickly or with a bias toward their own proprietary
features. That may cause them to read too carelessly or with an
unanticipated bias.
The result is that the presence of standards has not produced browsers
that render every page consistently with each other, hence most of the
discussion on these fora.

What should you do? Get a basic understanding of HTML (which I think
you've done). Then go through the HTML spec again. EACH TIME you come
to something DEPRECATED, jump over to the CSS2 spec and learn how to do
it using today's technology. (The CSS1 spec wording isn't as crisp,
especially in the area you're looking at).

Oh, and put an appropriate <doctype> at the top of every HTML page. It
will tell the browser which version of HTML you are trying to use (which
may affect its behavior), and will allow you to run the page through the
W3C HTML validator (http://validator.w3.org/).

Chris Beall






 
Reply With Quote
 
 
 
 
Chris Morris
Guest
Posts: n/a
 
      08-08-2003
"Andrew Fedoniouk" <(E-Mail Removed)> writes:
> PS: It seems that HTML standard itself is just one big deprecated block of
> text. You can use just one tag, lets say DIV and apply various styles to it.


Yes, you *can*. But in old HTML you *could* use <font> and <br> to do
almost as much damage to your document.

> example is here: http://www.blocknote.net/tests/31.htm (table there will
> fail on IE 6.0)
> What is the point of doctype declarations as CSS allows you completely avoid
> DTD (in terms of structure: which element can contain another)?


CSS is optional.

<div class="looklikeh1">My Page</div>

<div class="looklikep">My Paragraph <span class="looklikestrong">has
emphasis</span></div>

:: In CSS supporting browser

*My Page*

My Paragraph *has emphasis*

:: In non-CSS supporting browser

My Page
My Paragraph has emphasis


HTML is a language for describing the structure of the document - so
if there's an element that exists that has the desired meaning, it
should be used in preference to a generic element such as <div> or
<span>.
http://www.dur.ac.uk/ITS/WWW/accessi...structural.php

<h1>My Page</h1>
<p>My Paragraph <strong>has emphasis</strong></p>

--
Chris
 
Reply With Quote
 
Andrew Fedoniouk
Guest
Posts: n/a
 
      08-09-2003
Hi Chris.

Agreed with you by(on?) 100% !

My point: standard must force to use e.g. <EM> instead of anything else. It
just shouldn't allow to do that.
And FONT by the way. In those cases when changing font color for example
does not have any semantic meaning.

And what is it style="display:table"? What for? Where we are going to use
it? With which tag?

XML+CSS is our future? We are loosing letter 'T' in the word HTML....

Andrew Fedoniouk.
http://terra-informatica.org
http://blocknote.net



"Chris Morris" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "Andrew Fedoniouk" <(E-Mail Removed)> writes:
> > PS: It seems that HTML standard itself is just one big deprecated block

of
> > text. You can use just one tag, lets say DIV and apply various styles to

it.
>
> Yes, you *can*. But in old HTML you *could* use <font> and <br> to do
> almost as much damage to your document.
>
> > example is here: http://www.blocknote.net/tests/31.htm (table there will
> > fail on IE 6.0)
> > What is the point of doctype declarations as CSS allows you completely

avoid
> > DTD (in terms of structure: which element can contain another)?

>
> CSS is optional.
>
> <div class="looklikeh1">My Page</div>
>
> <div class="looklikep">My Paragraph <span class="looklikestrong">has
> emphasis</span></div>
>
> :: In CSS supporting browser
>
> *My Page*
>
> My Paragraph *has emphasis*
>
> :: In non-CSS supporting browser
>
> My Page
> My Paragraph has emphasis
>
>
> HTML is a language for describing the structure of the document - so
> if there's an element that exists that has the desired meaning, it
> should be used in preference to a generic element such as <div> or
> <span>.
>

http://www.dur.ac.uk/ITS/WWW/accessi...2/structural.p
hp
>
> <h1>My Page</h1>
> <p>My Paragraph <strong>has emphasis</strong></p>
>
> --
> Chris



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
floating point problem... floating indeed :( teeshift Ruby 2 12-01-2006 01:16 AM
DVD Verdict reviews: A STORY OF FLOATING WEEDS / FLOATING WEEDS: CRITERION COLLECTION and more! DVD Verdict DVD Video 0 04-20-2004 09:04 AM
FLOATING POINT DIVISION sunwij VHDL 3 12-29-2003 04:44 AM
synthesisable floating point Bruce Warkentin VHDL 3 12-23-2003 06:15 PM
floating point library salman sheikh VHDL 1 11-20-2003 07:03 PM



Advertisments