473,761 Members | 9,864 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:ri ght; width:200px">.. .</div>
<p>This paragraph is showed correctly</p>
<table style="width:30 0px">
<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 10291
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.infosystem s.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>ta ble{float:left}
/* clear siblings free of table */
#floatholder>ta ble + * {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.infosystem s.www.authoring.stylesheets, =?iso-8859-
1?q?Jesper_R=F8 nn-Jensen?= wrote:
Thanks for your replies. I got a workaround suggestion on the CSS-d
mailing list:

/* float table left */
#floatholder>ta ble{float:left}
/* clear siblings free of table */
#floatholder>ta ble + * {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>ta ble{float:left}
/* clear siblings free of table */
#floatholder>ta ble + * {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.infosystem s.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>ta ble{float:left}
/* clear siblings free of table */
#floatholder>ta ble + * {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.infosystem s.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:le ft}
/* 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.infosystem s.www.authoring.stylesheets, Gus Richter wrote:
Lauri Raittila wrote:
in comp.infosystem s.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:le ft}
/* 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

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

Similar topics

2
2391
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 other? the site is : http://www.rockshore.net/html/hol2.html div.lh-col{ width: 18%; float:left; border: solid #333333;
1
3965
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 from doing htat? Could I specify a right margin to the float so that IE6 wouldn't do that? -- .~. Might, Courage, Vision. In Linux We Trust.
3
6613
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 style="float:right; width:30%></div> </div></td>
1
3320
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 the next two images in a <DIV> tag with float: right in order to force the containing content to be aligned on the right. I also set position:relative so that any absolute positioning within the <DIV> will be relative to the itself. The...
9
17976
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: none; color:blue; } </style> </head>
3
19416
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 floated span 2 to be on the same line as span 1, but instead it is on the same line as span 3, which is on the line below span 1. Eric Meyer's CSS pocket reference gives a clue as to why this is so: "A floated element will generate a block-level box...
5
4923
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 appear inside the surrounding div. There is
22
51551
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 next line. What am I doing wrong? TIA.
7
25917
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 within the div. Is this doable? Thanks. <?php echo "<p>"; echo '<div id="navbar"> <a href="edit_reg.php">edit</a> &nbsp;<a href="undelete.php">undelete</a>
0
9345
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10115
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9905
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9775
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5229
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5373
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3881
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3456
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2752
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.