Possible Firefox bug: float:right and tables

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jesper Rønn-Jensen

    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.


    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
    [color=blue]
    >From the CSS2.1 spec I found this[/color]
    "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."


    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

  • David Dorward

    #2
    Re: Possible Firefox bug: float:right and tables

    Jesper Rønn-Jensen wrote:

    [color=blue]
    > As I understand, the table is supposed move downwards until it is clear
    > of the float.[/color]

    There is no reason why the code you presented should have that effect,
    however...
    [color=blue]
    > I made a test page to illustrate the problem.
    > http://visitjesper.homeip.net/test/c...at+tables.html[/color]

    Here you wrap the floated element in another container, which is a little
    different.
    [color=blue]
    > 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[/color]

    Bug in IE.




    --
    David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is

    Comment

    • Lauri Raittila

      #3
      Re: Possible Firefox bug: float:right and tables

      in comp.infosystem s.www.authoring.stylesheets, David Dorward wrote:[color=blue]
      > Jesper Rønn-Jensen wrote:
      >
      >[color=green]
      > > As I understand, the table is supposed move downwards until it is clear
      > > of the float.[/color]
      >
      > There is no reason why the code you presented should have that effect,
      > however...
      >[color=green]
      > > I made a test page to illustrate the problem.
      > > http://visitjesper.homeip.net/test/c...at+tables.html[/color]
      >
      > Here you wrap the floated element in another container, which is a little
      > different.
      >[color=green]
      > > 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[/color][/color]

      Strange effect on Opera 8b1...
      [color=blue]
      > Bug in IE.[/color]

      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.

      Comment

      • David Dorward

        #4
        Re: Possible Firefox bug: float:right and tables

        Lauri Raittila wrote:
        [color=blue]
        > 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...)[/color]

        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

        Comment

        • Jesper Rønn-Jensen

          #5
          Re: Possible Firefox bug: float:right and tables

          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:


          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

          Comment

          • Lauri Raittila

            #6
            Re: Possible Firefox bug: float:right and tables

            in comp.infosystem s.www.authoring.stylesheets, =?iso-8859-
            1?q?Jesper_R=F8 nn-Jensen?= wrote:[color=blue]
            > 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[/color]

            [color=blue]
            > But will this work
            > well when future browsers (IE) will support the syntax?[/color]

            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.

            Comment

            • Gus Richter

              #7
              Re: Possible Firefox bug: float:right and tables

              Jesper Rønn-Jensen wrote:[color=blue]
              > 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
              >[/color]

              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

              Comment

              • Lauri Raittila

                #8
                Re: Possible Firefox bug: float:right and tables

                in comp.infosystem s.www.authoring.stylesheets, Gus Richter wrote:[color=blue]
                > Jesper Rønn-Jensen wrote:[color=green]
                > > 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[/color][/color]
                [color=blue]
                > If you simply include to float the table left, the table will wrap and
                > there is no overlapping.[/color]

                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.

                Comment

                • Gus Richter

                  #9
                  Re: Possible Firefox bug: float:right and tables

                  Lauri Raittila wrote:[color=blue]
                  > in comp.infosystem s.www.authoring.stylesheets, Gus Richter wrote:
                  >[color=green]
                  >>Jesper Rønn-Jensen wrote:
                  >>[color=darkred]
                  >>>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[/color][/color]
                  >
                  >[color=green]
                  >>If you simply include to float the table left, the table will wrap and
                  >>there is no overlapping.[/color]
                  >
                  >
                  > Yes, but text after table flows on side of table.
                  >[/color]

                  Beside the point (and correctable).

                  --
                  Gus

                  Comment

                  • Lauri Raittila

                    #10
                    Re: Possible Firefox bug: float:right and tables

                    in comp.infosystem s.www.authoring.stylesheets, Gus Richter wrote:[color=blue]
                    > Lauri Raittila wrote:[color=green]
                    > > in comp.infosystem s.www.authoring.stylesheets, Gus Richter wrote:
                    > >[color=darkred]
                    > >>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[/color]
                    > >
                    > >[color=darkred]
                    > >>If you simply include to float the table left, the table will wrap and
                    > >>there is no overlapping.[/color]
                    > >
                    > >
                    > > Yes, but text after table flows on side of table.
                    > >[/color]
                    >
                    > Beside the point (and correctable).[/color]

                    The second line in workaround is the correction.

                    --
                    Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
                    Utrecht, NL.

                    Comment

                    • Gus Richter

                      #11
                      Re: Possible Firefox bug: float:right and tables

                      Lauri Raittila wrote:[color=blue]
                      > in comp.infosystem s.www.authoring.stylesheets, Gus Richter wrote:
                      >[color=green]
                      >>Lauri Raittila wrote:
                      >>[color=darkred]
                      >>>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.
                      >>>[/color]
                      >>
                      >>Beside the point (and correctable).[/color]
                      >
                      >
                      > The second line in workaround is the correction.
                      >[/color]

                      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

                      Comment

                      Working...