473,769 Members | 4,591 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
10 10293
Lauri Raittila wrote:
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 */
>#floathold er>table{float: left}
>/* clear siblings free of table */
>#floathold er>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
2392
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
6615
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
17977
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
4926
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
51554
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
25932
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
9590
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9424
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
10223
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...
0
10051
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5310
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...
1
3968
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
2
3571
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
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.