Re: Really basic float right problem cross browser



On 2009-09-30, dorayme <doraymeRidThis@xxxxxxxxxxxxxxx> wrote:
In article <slrnhc3ecu.31q.spamspam@xxxxxxxxxxxxxxxxx>,
Ben C <spamspam@xxxxxxxxx> wrote:

On 2009-09-28, dorayme <doraymeRidThis@xxxxxxxxxxxxxxx> wrote:
In article <slrnhbud1i.31l.spamspam@xxxxxxxxxxxxxxxxx>,
Ben C <spamspam@xxxxxxxxx> wrote:

I think the
correct CSS rules are unnecessarily silly in this case and the spec
should have been changed to what FF and IE were doing.

Come to think of it some more, I am interested in why you say this. In
respect to what sort of case?

When the line breaks before the float.

Suppose you've got this:

<div>
Here is some text <span>float</span>
</div>

We should see the float on the left and the word "Here" to the right of
it, aligned with the top of the float. (The span is floated left).

So far so good, but if the line breaks before the word "text" because
the container is narrow, then everything changes, and we get the line of
text first and the float below it.

This just seems a bit unintuitive to me.
[...]
I'm still puzzled because this is so unrealistic a case and I am trying
to get a handle on what a realistic case would be and why you find it
unintuitive?

<div>
Here is some text and let's make the sentence longer so we can narrow
... <img style="float: left; padding: .2em;" src="pics/crimson.png"
alt="">
</div>

First point to note is that in my older Camino, the only quickly
available browser I have that does it different to modern Safari, FF
etc, is that when the browser is not narrowed, a rather unintuitive
result happens, the float is on the next line to the text? Or am I too
used to the modern effect?

No, that is a bit unintuitive I guess.

What I suggest may be unintuitive is when you are expecting the modern
effect, but then the line breaks, and then suddenly you get the float on
the next line after all, with the word that is before it in the source
above it.

At least the ancient effect was more predictable.

Second, when the browser is narrowed, you lose the effect of wrapping
text around the float, carefully placing the float among the text. I
have been thinking this as some sort of common raison d'être for floats.

Not sure what you're talking about here. The text always flows around
the float same way doesn't it?

Anyway, what is important is consistency and from the author's point of
view, a carefully placed floated image in text seems to me to be a more
daunting task with the older browser way.

Well, you have to put it first. Relying on the modern (aka correct)
behaviour is a bit risky if you are being very careful about where your
floats end up, because you aren't sure where the line's going to break.
If you really want the float on the first line, put it first.

Perhaps we are thinking different cases?

No, same case I think.
.



Relevant Pages

  • Re: two column layout with drawbacks
    ... but without using float nor position? ... At least Supernova users can use it, ... If you are happy to deliver the columns to most browsers (modern and not ... stylesheet to IE6, that sounds like an intelligent method. ...
    (alt.html)
  • Re: Really basic float right problem cross browser
    ... correct CSS rules are unnecessarily silly in this case and the spec ... When the line breaks before the float. ... the container is narrow, then everything changes, and we get the line of ...
    (alt.html)
  • Re: about Float
    ... def f ... puts f ... but mixing BigDecimal with Float downgrades to ... So you have to be careful not to mix any Float constants in. ...
    (comp.lang.ruby)
  • Re: Regarding banking software
    ... It sounds like you will want to use Swing with a MySQL backend. ... be careful with float and double rounding errors. ...
    (comp.lang.java.programmer)