Re: float problem (bug?) in IE... Please check..

Discussion in 'HTML' started by rf, Nov 8, 2004.

  1. rf

    rf Guest

    Remco wrote:

    > I'm having a weird problem right aligning an image in a TD by using
    > float.
    > There remains a space between the border of the TD and the image.


    This is one of the artifacts caused by the totally broken box model in IE,
    especially where float: right is concerned. There is no solution AFAIK other
    than to try a different method of achieving what you want.

    Hint: Since your table cell is fixed width you might consider simply using a
    200 pixels wide image for that bottom "border". However, if any content is
    wider than 200 be warned that the cell will expand. Most table users get
    around this problem by nesting tables, like having a three cell table in
    that bottom cell containing the corners and spaced accordingly (a very bad
    IHMO hack).

    BTW you have many more problems than a little bit of background showing
    through. :)

    You use XHTML (the /> in the image elements tag) in an HTML transitional
    document.

    Tables for layout is questionable.

    You mix CSS (good) with things like align="center" (bad). CSS is supposed to
    handle *all* presentational issues.

    You are using a transitional doctype. You should really be using strict.
    Then you will find that height is not a valid attribute for those td
    elements. Note that the little you already have looks very different in
    firefox and IE.

    Do not specify font size on pixels. Use em or % or, preferably, nothing.

    If you start out correctly then you will have less things to correct/mend at
    the end.

    --
    Cheers
    Richard.
     
    rf, Nov 8, 2004
    #1
    1. Advertising

  2. rf

    Remco Guest

    > This is one of the artifacts caused by the totally broken box model in IE,
    > especially where float: right is concerned. There is no solution AFAIK other
    > than to try a different method of achieving what you want.


    Do you have an url about the broken box model issue?

    >
    > Hint: Since your table cell is fixed width you might consider simply using a
    > 200 pixels wide image for that bottom "border". However, if any content is
    > wider than 200 be warned that the cell will expand. Most table users get
    > around this problem by nesting tables, like having a three cell table in
    > that bottom cell containing the corners and spaced accordingly (a very bad
    > IHMO hack).


    Problem remains, inside the td i've created a nested table.
    <tr>
    <td width="15px"><img></td>
    <td width="*"><img></td>
    <td width="15px"><img></td>
    </tr>



    > Do not specify font size on pixels. Use em or % or, preferably, nothing.

    Why not font size in pixels?
    I've read css e-books and for as far as I understand 'px' is the best option.
    Why 'em' or 'px'?

    Thanks,

    Remco
     
    Remco, Nov 11, 2004
    #2
    1. Advertising

  3. rf

    Remco Guest

    <td width="*"> doesn't seem to do the same like <td width="100%">

    Is the latter one allowed within a TR with more td's with fixed width?

    Thanks,

    Remco
     
    Remco, Nov 11, 2004
    #3
  4. rf

    C A Upsdell Guest

    "Remco" <> wrote in message
    news:...
    >> Do not specify font size on pixels. Use em or % or, preferably, nothing.

    > Why not font size in pixels?
    > I've read css e-books and for as far as I understand 'px' is the best
    > option.


    You have clearly been reading the wrong books. px is the worst option (and
    pt is almost as bad).
     
    C A Upsdell, Nov 11, 2004
    #4
  5. rf

    Neal Guest

    On 11 Nov 2004 00:59:31 -0800, Remco <> wrote:

    >> Do not specify font size on pixels. Use em or % or, preferably, nothing.

    > Why not font size in pixels?
    > I've read css e-books and for as far as I understand 'px' is the best
    > option.
    > Why 'em' or 'px'?


    Ow. No.

    Pixels are useful when you know the exact environment. It's the WWW, you
    don't, so they are right out.

    Points are for paper.

    Ems are excellent, but if you use JUST ems IE has a bug in scaling the
    sizes.

    Best solution: use % in the root element (body) and em OR % anywhere else.
    And 100% is the user's preferred size, if they have one. If it looks too
    big (or too small), resize it yourself like your user either has done or
    ought to do.
     
    Neal, Nov 11, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Remco
    Replies:
    0
    Views:
    399
    Remco
    Nov 8, 2004
  2. Remco
    Replies:
    2
    Views:
    3,686
    neredbojias
    Nov 24, 2004
  3. daniel
    Replies:
    1
    Views:
    2,131
    Tom St Denis
    Jun 24, 2003
  4. bd
    Replies:
    0
    Views:
    673
  5. Carsten Fuchs
    Replies:
    45
    Views:
    1,660
    James Kanze
    Oct 8, 2009
Loading...

Share This Page