473,387 Members | 1,624 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,387 software developers and data experts.

Floating objects.

<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

Jul 20 '05 #1
3 3883
"Andrew Fedoniouk" <an****@terra-informatica.org> wrote in message
news:Gr*********************@news2.telusplanet.net ...
<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


Jul 20 '05 #2
"Andrew Fedoniouk" <an****@terra-informatica.org> 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
Jul 20 '05 #3
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" <c.********@durham.ac.uk> wrote in message
news:87************@dinopsis.dur.ac.uk...
"Andrew Fedoniouk" <an****@terra-informatica.org> 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

Jul 20 '05 #4

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

Similar topics

4
by: Dave | last post by:
Hi folks, I am trying to develop a routine that will handle sphere-sphere and sphere-triangle collisions and interactions. My aim is to develop a quake style collision engine where a player can...
31
by: JS | last post by:
We have the same floating point intensive C++ program that runs on Windows on Intel chip and on Sun Solaris on SPARC chips. The program reads the exactly the same input files on the two platforms....
687
by: cody | last post by:
no this is no trollposting and please don't get it wrong but iam very curious why people still use C instead of other languages especially C++. i heard people say C++ is slower than C but i can't...
10
by: Peter Ammon | last post by:
I'm fuzzy on exactly what I can depend on when doing floating point comparisons. I know that calculated values can differ, e.g. I'm not guaranteed that 1. + 2. == 3. What about comparisons with...
2
by: Jonathan Shan | last post by:
Hello, I'm experiencing a problem where the float being appended to the array is not the same as the result of the appending. 0.10000000149011612 0.10000000000000001 I'm expecting x =...
39
by: rembremading | last post by:
Hi all! The following piece of code has (for me) completely unexpected behaviour. (I compile it with gcc-Version 4.0.3) Something goes wrong with the integer to float conversion. Maybe somebody...
6
by: Matthew | last post by:
Hi, I want to change the precision level of floating point variables and calculations which is done in php.ini. However the server I rent for my domain does not give me access to php.ini,...
9
by: tron.thomas | last post by:
This C program: #include <stdio.h> #include <math.h> int main() { float value; for(value = -1.0f; 1.1f value; value += 0.1f){ printf("%.1f\n", value);
2
by: Rob Clewley | last post by:
Dear Pythonistas, How many times have we seen posts recently along the lines of "why is it that 0.1 appears as 0.10000000000000001 in python?" that lead to posters being sent to the definition...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.