473,385 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Possible Firefox bug: float:right and tables

Hope you can help me out on this one.
I have a a box that is floated right. Below (in the normal float) I
have a wide table.

<body>
<div style="float:right; width:200px">...</div>
<p>This paragraph is showed correctly</p>
<table style="width:300px">
<tr><td>This table is not moved downwards in Firefox. </td></tr>
<tr><td>IE gets it right.</td></tr>
</table>
</body>

As I understand, the table is supposed move downwards until it is clear
of the float. IE gets it right, but Firefox renders it differently: The
table does not move down and table content is rendered on top of the
float.

I made a test page to illustrate the problem.
http://visitjesper.homeip.net/test/c...at+tables.html

I also made screenshots to illustrate the problem.
IE 6 http://visitjesper.homeip.net/test/screenshot007.png
Firefox 1.0 http://visitjesper.homeip.net/test/screenshot008.png
From the CSS2.1 spec I found this

"If a shortened line box is too small to contain any further content,
then it is shifted downward until either it fits or there are no more
floats present."
http://www.w3.org/TR/CSS21/visuren.html#floats

This makes me assume that Firefox gets it wrong.

Would you please help me here:

* Any ideas for a workaround so that Firefox moves the table downward?
* Confirm if this is a bug or not.

Any feedback appreciated!

Best Regards,

Jesper Rønn-Jensen

Jul 21 '05 #1
10 10256
Jesper Rønn-Jensen wrote:

As I understand, the table is supposed move downwards until it is clear
of the float.
There is no reason why the code you presented should have that effect,
however...
I made a test page to illustrate the problem.
http://visitjesper.homeip.net/test/c...at+tables.html
Here you wrap the floated element in another container, which is a little
different.
I also made screenshots to illustrate the problem.
IE 6 http://visitjesper.homeip.net/test/screenshot007.png
Firefox 1.0 http://visitjesper.homeip.net/test/screenshot008.png


Bug in IE.

http://www.complexspiral.com/publica...aining-floats/
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 21 '05 #2
in comp.infosystems.www.authoring.stylesheets, David Dorward wrote:
Jesper Rønn-Jensen wrote:

As I understand, the table is supposed move downwards until it is clear
of the float.
There is no reason why the code you presented should have that effect,
however...
I made a test page to illustrate the problem.
http://visitjesper.homeip.net/test/c...at+tables.html


Here you wrap the floated element in another container, which is a little
different.
I also made screenshots to illustrate the problem.
IE 6 http://visitjesper.homeip.net/test/screenshot007.png
Firefox 1.0 http://visitjesper.homeip.net/test/screenshot008.png


Strange effect on Opera 8b1...
Bug in IE.


Are you sure? The first image was of FF and the other was from IE. (not
like the text beside link says, confuced me at least...)

It seems that it is bug in FF. That is, text should not overlap with
float. How this should be rendered is not as simple question, and IIRC,
Firebird 0.8 (Or was it Mozilla 1.0) had most right rendering, which also
looked most ugly... It started table where it should, and streched the
first row until lines in rightmost cells were under float.
--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Jul 21 '05 #3
Lauri Raittila wrote:
Are you sure? The first image was of FF and the other was from IE. (not
like the text beside link says, confuced me at least...)


Ah, kicks self for not looking at the screenshots and working from the
description alone. Not the problem I thought it was.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 21 '05 #4
Thanks for your replies. I got a workaround suggestion on the CSS-d
mailing list:

/* float table left */
#floatholder>table{float:left}
/* clear siblings free of table */
#floatholder>table + * {clear:left}

I updated my test case to include the workaround John suggested. See it
here:
http://visitjesper.homeip.net/test/c...httable02.html

The workaround is really well thought of, I think. But will this work
well when future browsers (IE) will support the syntax?

Best regards,

Jesper

Jul 21 '05 #5
in comp.infosystems.www.authoring.stylesheets, =?iso-8859-
1?q?Jesper_R=F8nn-Jensen?= wrote:
Thanks for your replies. I got a workaround suggestion on the CSS-d
mailing list:

/* float table left */
#floatholder>table{float:left}
/* clear siblings free of table */
#floatholder>table + * {clear:left}

I updated my test case to include the workaround John suggested. See it
here:
http://visitjesper.homeip.net/test/c...httable02.html
But will this work
well when future browsers (IE) will support the syntax?


If it starts supporting > but does not +, then you have small problem.
Jou can try it by not using the second rule and testing on working
browser.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Jul 21 '05 #6
Jesper Rønn-Jensen wrote:
Thanks for your replies. I got a workaround suggestion on the CSS-d
mailing list:

/* float table left */
#floatholder>table{float:left}
/* clear siblings free of table */
#floatholder>table + * {clear:left}

I updated my test case to include the workaround John suggested. See it
here:
http://visitjesper.homeip.net/test/c...httable02.html

The workaround is really well thought of, I think. But will this work
well when future browsers (IE) will support the syntax?

Best regards,

Jesper


If you simply include to float the table left, the table will wrap and
there is no overlapping. This is so if the table is before or after the
box in which cases the box or the table will wrap respectively. FF
appears to have the wrapping problem only if the table is not floated
and has to be wrapped.

--
Gus
Jul 21 '05 #7
in comp.infosystems.www.authoring.stylesheets, Gus Richter wrote:
Jesper Rønn-Jensen wrote:
Thanks for your replies. I got a workaround suggestion on the CSS-d
mailing list:

/* float table left */
#floatholder>table{float:left}
/* clear siblings free of table */
#floatholder>table + * {clear:left}

I updated my test case to include the workaround John suggested. See it
here:
http://visitjesper.homeip.net/test/c...httable02.html
If you simply include to float the table left, the table will wrap and
there is no overlapping.


Yes, but text after table flows on side of table.


--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Jul 21 '05 #8
Lauri Raittila wrote:
in comp.infosystems.www.authoring.stylesheets, Gus Richter wrote:
Jesper Rønn-Jensen wrote:
Thanks for your replies. I got a workaround suggestion on the CSS-d
mailing list:

/* float table left */
#floatholder>table{float:left}
/* clear siblings free of table */
#floatholder>table + * {clear:left}

I updated my test case to include the workaround John suggested. See it
here:
http://visitjesper.homeip.net/test/c...httable02.html


If you simply include to float the table left, the table will wrap and
there is no overlapping.

Yes, but text after table flows on side of table.


Beside the point (and correctable).

--
Gus
Jul 21 '05 #9
in comp.infosystems.www.authoring.stylesheets, Gus Richter wrote:
Lauri Raittila wrote:
in comp.infosystems.www.authoring.stylesheets, Gus Richter wrote:
Jesper Rønn-Jensen wrote:

Thanks for your replies. I got a workaround suggestion on the CSS-d
mailing list:

/* float table left */
#floatholder>table{float:left}
/* clear siblings free of table */
#floatholder>table + * {clear:left}

I updated my test case to include the workaround John suggested. See it
here:
http://visitjesper.homeip.net/test/c...httable02.html


If you simply include to float the table left, the table will wrap and
there is no overlapping.

Yes, but text after table flows on side of table.


Beside the point (and correctable).


The second line in workaround is the correction.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Jul 21 '05 #10
Lauri Raittila wrote:
in comp.infosystems.www.authoring.stylesheets, Gus Richter wrote:
Lauri Raittila wrote:
in comp.infosystems.www.authoring.stylesheets, Gus Richter wrote:
Jesper Rønn-Jensen wrote:
>Thanks for your replies. I got a workaround suggestion on the CSS-d
>mailing list:
>
>/* float table left */
>#floatholder>table{float:left}
>/* clear siblings free of table */
>#floatholder>table + * {clear:left}
>
>I updated my test case to include the workaround John suggested. See it
>here:
>http://visitjesper.homeip.net/test/c...httable02.html
If you simply include to float the table left, the table will wrap and
there is no overlapping.
Yes, but text after table flows on side of table.


Beside the point (and correctable).

The second line in workaround is the correction.


Perhaps, although it still leaves open the question of support. I think
that the div container for the text after the table containing simply
clear:left; will cause the text to clear.

--
Gus
Jul 21 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: jon slinn | last post by:
Does anybody know why I can't get a simple two col design to work using the following css? At the moment my columns seem to be arranging left and right correctly but are stacked on top of each...
1
by: toylet | last post by:
Unlike Mozilla, when float:right an item in IE6, it's sort of appending a <br> after the float. You can see the difference here: http://toylet.homeip.net/~toylet Is there a way to stop IE6...
3
by: Günther Stößl | last post by:
Hello I am trying to position two floats inside a table column. <td> <div style="position:relative; width:100%"> <div style="position:absolute; left:0px; width:60%>... </div> <div...
1
by: JKenyon | last post by:
I am attempting to display two images on a web page. The second "image" is actually two images, one overlaid on the other. The first one is aligned on the left using float:left. I have enclosed...
9
by: leegold | last post by:
Why does float:right cause a line break? Try the code below. Is there a fix? I want the link on the same line as the text. Thanks <html> <head> <STYLE> span.linkpos { float:right; clear:...
3
by: Michael Shell | last post by:
Greetings, I've been playing with CSS inline floats of <span> elements and the results are not quite what I would expect. In the example attached at the end of this post, I would expect the...
5
by: Oliver Block | last post by:
Hello everybody, I wonder why a <span style="float:right">some text</span> might be displayed out of a surrounding div element. It is shifted to the next line. I thougt it is supposed to...
22
by: ashkaan57 | last post by:
Hi, I am trying to put text on left and right side of the page and used: <div> <span>blah blah</span> <span style="float:right">blah blah</span> </div> The 2nd text does go to the right but the...
7
by: JackRbt | last post by:
I have a navbar in a div, with several links. The last one is in a <span> because I want it to float to the right by itself. The span does float right, but it shows up below the navbar div. I want it...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.