Re: Really basic float right problem cross browser



In article
<45311ca8-1504-48e8-a68c-4aec5d9fb686@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
cronoklee <cronoklee@xxxxxxxxxxx> wrote:

Why would you be using transitional as a doctype? What are you
transitioning from, as a well known regular around here likes to say?

The doctype makes no difference as fa as I can tell. Strict and
Transitional produce the same problem. See example below

Lets agree that we all should use a good doctype declaration and be
daring and say it is 4.01 Strict for the moment.

The more logical way to do your above is to
<div style="float:right">floated right!</div>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>...


Yes I mentioned placing the float before the inline my post but I'd
prefer a CSS solution. Floated right content should appear beneath
main content when CSS is off.


As mentioned, if you put the floated element to the right of mere inline
content and the latter is lots that wrap to a few lines, you might not
get the float appearing quite where you want it in vertical space. Let's
see below...



Well, for one thing that's invalid markup so it might not be so
surprising that it renders differently in different browsers. Inline
content cannot be contained in the <body> "naked"; it must be nested in
a block element.


OK well imagine I originally posted this then:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/
TR/html4/strict.dtd"><html>
<head>
<title>test</title>
</head>
<body>
<span>Some inline content<span><div style="float:right">floated right!
</div>
</body>
</html>


Let's close your SPAN. But even so, this does not get over the point you
are responding to because SPAN itself is an inline element.

I would be rid of span and use a paragraph element. But, for the point I
make now, it will make no difference, either! If you style the P or the
SPAN with style="float: left;", you should see what you want to see in
the recalcitrant browsers and have the right float text appear under the
left if CSS is off.

Is this a "CSS solution" that you wanted?

Why is there such a difference in browsers in your original case? Ask
Microsoft, they produced buggy browsers because they were careless and
too much on their minds at the time. Getting them to reasonable
standards has been a bit like getting North Korea to give up nuclear
weapon capability.


The latest FF and Chrome on PC render the float at the top of the page
while IE8 and almost all older browsers render it down a line.

Any ideas what's going on here?


--
dorayme
.



Relevant Pages

  • Re: height in floats
    ... browsers of course, but also specific differences which need to ... It's particularly clear what's going on in Fig 13: the first float is ... The inline after it is what makes the next float start aligned to ... This is incorrect behaviour (see below ...
    (comp.infosystems.www.authoring.stylesheets)
  • Re: height in floats
    ... browsers of course, but also specific differences which need to ... The combos on page 6 differ between Firefox and Safari/Opera I think all ... It's particularly clear what's going on in Fig 13: the first float is ... The inline after it is what makes the next float start aligned to ...
    (comp.infosystems.www.authoring.stylesheets)
  • Re: height in floats
    ... browsers of course, but also specific differences which need to ... The combos on page 6 differ between Firefox and Safari/Opera I think all ... It's particularly clear what's going on in Fig 13: the first float is ... The inline after it is what makes the next float start aligned to ...
    (comp.infosystems.www.authoring.stylesheets)
  • Re: Float and Shrinkwrap
    ... both start at 0,0 (without any positioning). ... In the instance of a float we actually 'already' have the float ... If browsers can go different ways on some combinations, ... Sometimes the programmers don't understand the spec, ...
    (comp.infosystems.www.authoring.stylesheets)
  • Re: Really basic float right problem cross browser
    ... transitioning from, as a well known regular around here likes to say? ... surprising that it renders differently in different browsers. ... Let's close your SPAN. ... Is this a "CSS solution" that you wanted? ...
    (alt.html)