HighDots Forums  

Float and Shrinkwrap

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Float and Shrinkwrap in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #31  
Old   
Gus Richter
 
Posts: n/a

Default Re: Float and Shrinkwrap - 04-07-2008 , 11:44 PM






dorayme wrote:
Quote:
I am inclined to actually use the phrase "containing block" where the
context shows it to do a job of containing.

Because the point is that it is the container, the parent, the big house
where the children live... It is crucial that it is on the container,
the parent, that rel pos is made for the abs to work.

And I find it interesting how the "layers" work and yet the float still
exerts the influence to push aside (displace) the text or pics in the
following divs. Just had never thought of the float rules operating from
a smothered "underneath" position! Those float rules are powerful voodoo
huh? <g
1. Any floated item will be out of the normal flow.
2. When floated left, it will position itself to top,left (0,0) of its
"container block".
3. The special feature of a float is that any inline box content in the
"container box" will shift over to make room for the float.
4. Blah, blah, blah, blah.

You are having difficulty in accepting the container thing, so try
asking yourself:
"If the float positions itself to 0,0 of the container block,
then what could be the container block?"

--
Gus


Reply With Quote
  #32  
Old   
dorayme
 
Posts: n/a

Default Re: Float and Shrinkwrap - 04-07-2008 , 11:50 PM






In article <ScudnU3ayMXRaGfanZ2dnUVZ_gadnZ2d (AT) golden (DOT) net>,
Gus Richter <gusrichter (AT) netscape (DOT) net> wrote:

Quote:
Not sure if this will convince you away from the dark side
?

Quote:
This is because in the one instance you displace the float and the
real estate it had occupied before is retained.
I was not the least puzzled by the examples at the end. They were not
offered as something to be explained but to make a point about
terminology.

--
dorayme


Reply With Quote
  #33  
Old   
rf
 
Posts: n/a

Default Re: Float and Shrinkwrap - 04-07-2008 , 11:57 PM



Gus Richter <gusrichter (AT) netscape (DOT) net> wrote in
news:WoOdnYR9Y7aBZWfanZ2dnUVZ_gKdnZ2d (AT) golden (DOT) net:

Quote:
2. When floated left, it will position itself to top,left (0,0) of its
"container block".
http://www.w3.org/TR/CSS21/visuren.html#floats

When floated left it will be shifted to the left until its outer edge
touches the containing block edge or the outer edge of another float. If
there is a line box the top of the floated box is aligned with the top of
the current line box. This will usually not be the top of the container
block.

--
Richard
Killing all threads involving google groups
The Usenet Improvement Project: http://improve-usenet.org


Reply With Quote
  #34  
Old   
Gus Richter
 
Posts: n/a

Default Re: Float and Shrinkwrap - 04-08-2008 , 12:15 AM



rf wrote:
Quote:
Gus Richter <gusrichter (AT) netscape (DOT) net> wrote in
news:WoOdnYR9Y7aBZWfanZ2dnUVZ_gKdnZ2d (AT) golden (DOT) net:

2. When floated left, it will position itself to top,left (0,0) of its
"container block".

http://www.w3.org/TR/CSS21/visuren.html#floats

When floated left it will be shifted to the left until its outer edge
touches the containing block edge or the outer edge of another float. If
there is a line box the top of the floated box is aligned with the top of
the current line box. This will usually not be the top of the container
block.
Funny thing is that when I read it, it says:
A floated box is shifted to the left or right until its outer edge
touches the containing block edge or the outer edge of another float.
If there's a line box, the top of the floated box is aligned with the
top of the current line box.

What makes you add the last sentence in your quote?

--
Gus



Reply With Quote
  #35  
Old   
dorayme
 
Posts: n/a

Default Re: Float and Shrinkwrap - 04-08-2008 , 12:23 AM



In article <WoOdnYR9Y7aBZWfanZ2dnUVZ_gKdnZ2d (AT) golden (DOT) net>,
Gus Richter <gusrichter (AT) netscape (DOT) net> wrote:

Quote:
dorayme wrote:

I am inclined to actually use the phrase "containing block" where the
context shows it to do a job of containing.

In the float rules you refer to, the idea of containment, as I have been
thinking about it, refers to a parent in a particular set up (much like
some of your examples with wrappers). You seem to favour the container
word to refer to the following (html order) sibling after the float.

Quote:
You are having difficulty in accepting the container thing, so try
asking yourself:
"If the float positions itself to 0,0 of the container block,
then what could be the container block?"
I was rather hoping to have made that clear (at least to myself) in the
early pages of <http://netweaver.com.au/floatHouse/> <g>

Anyway, Gus, thanks for raising this business. You would probably be
surprised if you knew what in all of this I am interested in. It has to
do with my previous point about predictability and human readability of
the rules. I don't think I can get this across. My fault for sure.

Cheers.

--
dorayme


Reply With Quote
  #36  
Old   
Gus Richter
 
Posts: n/a

Default Re: Float and Shrinkwrap - 04-08-2008 , 12:28 AM



dorayme wrote:
Quote:
In article <ScudnU3ayMXRaGfanZ2dnUVZ_gadnZ2d (AT) golden (DOT) net>,
Gus Richter <gusrichter (AT) netscape (DOT) net> wrote:

Not sure if this will convince you away from the dark side

?
I guess you're too young to remember Star Wars.

Quote:
This is because in the one instance you displace the float and the
real estate it had occupied before is retained.

I was not the least puzzled by the examples at the end. They were not
offered as something to be explained but to make a point about
terminology.
Sorry, but "this is reasonably clear" made me think otherwise.

--
Gus



Reply With Quote
  #37  
Old   
rf
 
Posts: n/a

Default Re: Float and Shrinkwrap - 04-08-2008 , 12:32 AM



Gus Richter <gusrichter (AT) netscape (DOT) net> wrote in
news:mtmdnc-aIeb5YmfanZ2dnUVZ_hadnZ2d (AT) golden (DOT) net:

Quote:
rf wrote:
Gus Richter <gusrichter (AT) netscape (DOT) net> wrote in
news:WoOdnYR9Y7aBZWfanZ2dnUVZ_gKdnZ2d (AT) golden (DOT) net:

2. When floated left, it will position itself to top,left (0,0) of
its "container block".

http://www.w3.org/TR/CSS21/visuren.html#floats

When floated left it will be shifted to the left until its outer edge
touches the containing block edge or the outer edge of another float.
If there is a line box the top of the floated box is aligned with the
top of the current line box. This will usually not be the top of the
container block.

Funny thing is that when I read it, it says:
A floated box is shifted to the left or right until its outer edge
touches the containing block edge or the outer edge of another
float. If there's a line box, the top of the floated box is aligned
with the top of the current line box.

What makes you add the last sentence in your quote?
The quoted, or rather restated, text is incomplete and therefore
misleading. I added that last sentence to clarify matters.

<body>
<p>
a very long paragraph that causes lots of line boxes to be generated a
very long paragraph that causes lots of line boxes to be generated a very
long paragraph that causes lots of line boxes to be generated a very long
paragraph that causes lots of line boxes to be generated a very long
paragraph that causes lots of line boxes to be generated a very long
paragraph that causes lots of line boxes to be generated a very long
paragraph that causes lots of line boxes to be generated a very long
paragraph that causes lots of line boxes to be generated a very long
paragraph that causes lots of line boxes to be generated the last text
before the image <img src=... style='float: left'> a bit more text
</p>
</body>

There will be quite a number of line boxes before the image is
encountered. The image will be floated to the left of the containing
block but the top of the image will be aligned with the top of the line
box that contains the text 'the last text before the image' or
thereabouts, depending on how the text is wrapped. This is nowhere near
the top of the containing box.

If you follow the above link and then scroll down a bit you will find an
illustration where a floated element overlaps two paragraphs. The caption
is "A floating image obscures borders ..." Note that the top of the
floated element is not at the top of the first paragraph. It is at the
top of the second line block. Look closely at the text, looking for the
(X).


--
Richard
Killing all threads involving google groups
The Usenet Improvement Project: http://improve-usenet.org


Reply With Quote
  #38  
Old   
Gus Richter
 
Posts: n/a

Default Re: Float and Shrinkwrap - 04-08-2008 , 12:40 AM



dorayme wrote:
Quote:
In the float rules you refer to, the idea of containment, as I have been
thinking about it, refers to a parent in a particular set up (much like
some of your examples with wrappers). You seem to favour the container
word to refer to the following (html order) sibling after the float.
I use the term "container block" because it is the one used in the
specs. I mentioned in an earlier post that I think of it more as "float
box" because it is a special thing just for floats.

You wish to see it in the more conventional way of something inside a
"container" as in a non-float situation. Please try the latest that I
posted right after mentioning the "dark side". They are constructed in
the conventional way.

--
Gus


Reply With Quote
  #39  
Old   
Gus Richter
 
Posts: n/a

Default Re: Float and Shrinkwrap - 04-08-2008 , 01:09 AM



rf wrote:
Quote:
Gus Richter <gusrichter (AT) netscape (DOT) net> wrote in
news:mtmdnc-aIeb5YmfanZ2dnUVZ_hadnZ2d (AT) golden (DOT) net:

rf wrote:
Gus Richter <gusrichter (AT) netscape (DOT) net> wrote in
news:WoOdnYR9Y7aBZWfanZ2dnUVZ_gKdnZ2d (AT) golden (DOT) net:

2. When floated left, it will position itself to top,left (0,0) of
its "container block".
http://www.w3.org/TR/CSS21/visuren.html#floats

When floated left it will be shifted to the left until its outer edge
touches the containing block edge or the outer edge of another float.
If there is a line box the top of the floated box is aligned with the
top of the current line box. This will usually not be the top of the
container block.
Funny thing is that when I read it, it says:
A floated box is shifted to the left or right until its outer edge
touches the containing block edge or the outer edge of another
float. If there's a line box, the top of the floated box is aligned
with the top of the _current_ line box.

What makes you add the last sentence in your quote?

The quoted, or rather restated, text is incomplete and therefore
misleading. I added that last sentence to clarify matters.

body
p
a very long paragraph that causes lots of line boxes to be generated a
very long paragraph that causes lots of line boxes to be generated a very
long paragraph that causes lots of line boxes to be generated a very long
paragraph that causes lots of line boxes to be generated a very long
paragraph that causes lots of line boxes to be generated a very long
paragraph that causes lots of line boxes to be generated a very long
paragraph that causes lots of line boxes to be generated a very long
paragraph that causes lots of line boxes to be generated a very long
paragraph that causes lots of line boxes to be generated the last text
before the image <img src=... style='float: left'> a bit more text
/p
/body

There will be quite a number of line boxes before the image is
encountered. The image will be floated to the left of the containing
block but the top of the image will be aligned with the top of the line
box that contains the text 'the last text before the image' or
thereabouts, depending on how the text is wrapped. This is nowhere near
the top of the containing box.

If you follow the above link and then scroll down a bit you will find an
illustration where a floated element overlaps two paragraphs. The caption
is "A floating image obscures borders ..." Note that the top of the
floated element is not at the top of the first paragraph. It is at the
top of the second line block. Look closely at the text, looking for the
(X).
You are absolutely right about what you say. The spec does cover this
(highlighted by me in the quote above) by saying that it is aligned to
the top of the _current_ line box.

The mistake is mine. We've been using only one and not multiple
instances as you have pointed out. I've been referring to our examples
only without thinking about other variables. Thank you for pointing this
out. I do not profess to be an expert and expect to be corrected.

I do, however, have an issue with correcting the spec since it is
correct in this instance and the correction should be in my statement:

2. When floated left, it will position itself to top,left (0,0) of its
"container block".

which should be corrected to:

2. When floated left, it will position itself to the left of its
"container block" and to the top of the current line box. In the
instance where the float is presented initially, or there is only
one line box, the top of the container block is the same as the
top of the first line box.

I hope that this is OK? I was not trying to rewrite the specs, but just
trying to explain my understanding of the float.

--
Gus


Reply With Quote
  #40  
Old   
rf
 
Posts: n/a

Default Re: Float and Shrinkwrap - 04-08-2008 , 02:35 AM



dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote in news:doraymeRidThis-
10CA04.15233508042008 (AT) news-vip ...ptusnet.com.au:

Quote:
In article <WoOdnYR9Y7aBZWfanZ2dnUVZ_gKdnZ2d (AT) golden (DOT) net>,
Gus Richter <gusrichter (AT) netscape (DOT) net> wrote:

dorayme wrote:

I am inclined to actually use the phrase "containing block" where the
context shows it to do a job of containing.


In the float rules you refer to, the idea of containment, as I have been
thinking about it, refers to a parent in a particular set up
The containing block is not neccessarily the parent.


--
Richard
Killing all threads involving google groups
The Usenet Improvement Project: http://improve-usenet.org


Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.