Click here to get back home

Clearing floaters in Mozilla

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Clearing floaters in Mozilla Andrey Tarasevich 08-19-2005
Get Chitika Premium
Posted by Andrey Tarasevich on August 19, 2005, 6:03 pm
Please log in for more thread options


Hello

Consider the following simple piece of HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html style="width: 100%; height: 100%">
<body style="width: 100%; height: 100%">

<div style="width: 200px; height: 200px; background-color: #000; float:
left"></div>
<p>Test</p>

<div style="background-color: #ccc; clear: all">Test</div>

</body>
</html>

In IE 6 the 'clear' property in the second <div> appears to work, i.e. the
second <div> is placed below the first one. In Mozilla 1.7.8 it is placed to the
right from the first <div>, i.e. it looks like the second <div>'s 'clear'
property is completely ignored.

Why is this happening? Which browser is behaving correctly? And if Mozilla's
behavior is correct, then what's is the proper way to clear the floaters by
using CSS properties?

I know that <br clear="all"> will work in Mozilla, but it has its own issues and
also I'd like to be able to do it through CSS properties.

--
Best regards,
Andrey

Posted by Andrey Tarasevich on August 19, 2005, 6:06 pm
Please log in for more thread options


Andrey Tarasevich wrote:
> ...
> Consider the following simple piece of HTML
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
> "http://www.w3.org/TR/html4/strict.dtd">
>
> <html style="width: 100%; height: 100%">
> <body style="width: 100%; height: 100%">
>
> <div style="width: 200px; height: 200px; background-color: #000; float:
left"></div>
> <p>Test</p>
>
> <div style="background-color: #ccc; clear: all">Test</div>
>
> </body>
> </html>
>
> In IE 6 the 'clear' property in the second <div> appears to work, i.e. the
> second <div> is placed below the first one. In Mozilla 1.7.8 it is placed to
the
> right from the first <div>, i.e. it looks like the second <div>'s 'clear'
> property is completely ignored.
> ...

Oops, sorry. I can already see my mistake. In CSS it should be "clear: both". IE
mislead me by accepting "clear: all" variant.

--
Best rergards,
Andrey

Posted by Fly Cooter on August 19, 2005, 10:11 pm
Please log in for more thread options


says...
>
>
>Hello
>
>Consider the following simple piece of HTML
>
><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
>"http://www.w3.org/TR/html4/strict.dtd">
>
><html style="width: 100%; height: 100%">
><body style="width: 100%; height: 100%">
>
><div style="width: 200px; height: 200px; background-color: #000; float:
>left"></div>
><p>Test</p>
>
><div style="background-color: #ccc; clear: all">Test</div>
>
></body>
></html>
>
>In IE 6 the 'clear' property in the second <div> appears to work, i.e. the
>second <div> is placed below the first one. In Mozilla 1.7.8 it is placed to
the
>right from the first <div>, i.e. it looks like the second <div>'s 'clear'
>property is completely ignored.
>
>Why is this happening? Which browser is behaving correctly? And if Mozilla's
>behavior is correct, then what's is the proper way to clear the floaters by
>using CSS properties?
>
>I know that <br clear="all"> will work in Mozilla, but it has its own issues
and
>also I'd like to be able to do it through CSS properties.

If you're using Windows, you should stick with IE because it was created for
Windows. Don't mess with Mozilla or Netscape. If you insist on using a
different browser, try Opera (but it still doesn't beat IE).

--
Fly Cooter
http://fly-cooter.tripod.com


Posted by Neredbojias on August 19, 2005, 11:24 pm
Please log in for more thread options


With neither quill nor qualm, Fly Cooter quothed:

> >I know that <br clear="all"> will work in Mozilla, but it has its own issues
> and
> >also I'd like to be able to do it through CSS properties.
>
> If you're using Windows, you should stick with IE because it was created for
> Windows. Don't mess with Mozilla or Netscape. If you insist on using a
> different browser, try Opera (but it still doesn't beat IE).

That's bullshit. Sure, Mozilla has problems and plenty of them but IE
has a class of greater-magnitude problems that shouldn't be extant. The
message prior to this original is a perfect example of what happens when
IE tries to "compensate" for faulty markup.

--
Neredbojias
Contrary to popular belief, it is believable.

Posted by Shawn K. Quinn on August 20, 2005, 5:23 am
Please log in for more thread options


begin quotation
> says...
>> In IE 6 the 'clear' property in the second <div> appears to work,
>> i.e. the second <div> is placed below the first one. In Mozilla 1.7.8
>> it is placed to the right from the first <div>, i.e. it looks like
>> the second <div>'s 'clear' property is completely ignored.
>>
>> Why is this happening? Which browser is behaving correctly? And if
>> Mozilla's behavior is correct, then what's is the proper way to clear
>> the floaters by using CSS properties?
>>
>> I know that <br clear="all"> will work in Mozilla, but it has its own
>> issues and also I'd like to be able to do it through CSS properties.
>
> If you're using Windows, you should stick with IE because it was created for
> Windows. Don't mess with Mozilla or Netscape. If you insist on using a
> different browser, try Opera (but it still doesn't beat IE).

Absolutely terrible advice. Internet Explorer has more holes in it than
Swiss cheese, and fails miserably to implement many standards properly
(most notably, CSS, HTML, HTTP, and PNG).

There are reasons why Windows versions of Mozilla and Opera exist; the
one I can think of right off-hand is so one person can use the same
browser on multiple operating systems. There is no native, currently
maintained version of Internet Explorer for GNU/Linux and other GNU
variants, OpenBSD, NetBSD, FreeBSD, Solaris, AIX, HP/UX, MacOS 9, MacOS
X, IRIX, and, for that matter, just about every other operating system
out there *not* made by Microsoft.

--
___ _ _____ |*|
/ __| |/ / _ \ |*| Shawn K. Quinn
\__ \ ' < (_) | |*| skquinn@speakeasy.net
|___/_|\_\__\_\ |*| Houston, TX, USA

Similar ThreadsPosted
clearing out a May 3, 2005, 1:06 pm
selected clearing January 24, 2008, 11:36 am
Memory clearing and reload. January 23, 2005, 3:00 pm
clearing only local floats November 11, 2006, 11:22 am
Clearing floats without introducing a new line. How? August 18, 2005, 2:47 pm
CSS in IE6 vs Mozilla November 14, 2005, 10:53 pm
wordwrapping in mozilla November 21, 2006, 4:49 am
IFRAME and Mozilla - does it exist? March 17, 2005, 7:19 am
Trouble with CSS in tables with Mozilla July 1, 2005, 1:50 pm
Migrating from MSIE to Mozilla August 1, 2005, 7:25 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap