Re: Really basic float right problem cross browser
- From: dorayme <doraymeRidThis@xxxxxxxxxxxxxxx>
- Date: Thu, 24 Sep 2009 09:09:12 +1000
In article
<45311ca8-1504-48e8-a68c-4aec5d9fb686@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
cronoklee <cronoklee@xxxxxxxxxxx> wrote:
Lets agree that we all should use a good doctype declaration and beWhy 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
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
.
- Follow-Ups:
- Re: Really basic float right problem cross browser
- From: Ben C
- Re: Really basic float right problem cross browser
- From: cronoklee
- Re: Really basic float right problem cross browser
- References:
- Really basic float right problem cross browser
- From: Ciaran
- Re: Really basic float right problem cross browser
- From: Neredbojias
- Re: Really basic float right problem cross browser
- From: cronoklee
- Really basic float right problem cross browser
- Prev by Date: Re: driving me nuts!
- Next by Date: Re: Nav bar/buttons
- Previous by thread: Re: Really basic float right problem cross browser
- Next by thread: Re: Really basic float right problem cross browser
- Index(es):
Relevant Pages
|