RE: Microsoft's Chapter_9/positioning-float-002.htm

> Hi,

Hello Robert,

> I have been trying to get the 'Filler text' positioned in 61px, however
> I have no idea how to do this, can somebody please let me know where I
> make any mistake.

When I wrote about "Filler text", Times New Roman font and 61px, I meant
to say that the <span>Filler text</span> in the testcase occupies a
computed width of 61px. I have used Firefox's DOM inspector, Opera
DragonFly, Konqueror's DOM treeviewer and IE8 developer tools (F12,
select the span node, then select the Layout tab) to see, to get such
61px value. All browsers now have the ability to inspect almost any DOM
node of a webpage and see its respective computed values for any CSS

E.g.: in Opera 10.10, load the testcase, then Tools/Advanced/Developer
tools/ and then in the lower left pane, choose DOM tab, click [+]body,
then [+]div, then click <span>. Then in the lower right pane, click >
Computed style then scroll down to view the width (or any other
property, say, like font-family). You can hide the default values by
clicking the button with a 0 in it.

For Firefox DOM inspector 2.0.4, you need to download it and install it
as an extension:


So, can 3 "Filler text" separated by 2 white blank spaces fill into a 2
inches width? 192px >= 3 * 61px + 2 blank spaces ? As I said, there is
almost no leeway for the testcase.

>From there, I tested many more fonts and from there concluded that a
wrapping div of 2 inches is just not wide enough for almost any fonts
besides Times New Roman and Impact would fail. When the wrapping div is
set to 15em (which equates to 240px) in the other version of the
testcase, the testcase can still fail for Linux-based browsers and I
have the maths to demonstrate this.

The most important thing about the testcase is that it does not require
the wrapping div to have any specified, fixed width to begin with. I see
such mistake often in Microsoft's testcases: the wrapping div <div
id="div1"> often has a fixed, specified width (which constraint the
testcase from a layout perspective) when the testcase does not require
so in order to test what the testcase is supposed to test.

regards, Gérard Talbot

>> Testcases involved are:
>> sitioning-float-002.htm
>> (using a width of 15em == 240px)
>> and
>> 002.htm
>> (using a width of 2in == 192px)

Contributions to the CSS 2.1 test suite:

CSS 2.1 test suite (alpha 2; March 16th 2010):

CSS 2.1 test suite contributors:

Received on Tuesday, 27 April 2010 16:07:32 UTC