td {width: 20px}

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Guest's Avatar

    td {width: 20px}

    ---------------
    <style>
    td.left {width: 20px; background-image: url(left_tab.pn g)}
    td.m {background-image: url(middle_tab. png)}
    td.right {width: 20px; background-image: url(right_tab.p ng)}
    </style>
    ---------------
    In IE following html works fine and td.left & td.right has width 20 pixels.
    In Mozilla td.left & td.right dissapear (because they don't have contents)
    What I can do for width in Mozilla? I want exactly 20 pixels width
    ---------------
    <table><tr>
    <td class=left><td class=m>Tab1<td class=right>
    </tr></table>
    ---------------


  • Peter Foti

    #2
    Re: td {width: 20px}

    "<- Chameleon ->" <cham_gss@hotma il.NOSPAM.com> wrote in message
    news:bls7ol$aqk $1@nic.grnet.gr ...[color=blue]
    > ---------------
    > <style>
    > td.left {width: 20px; background-image: url(left_tab.pn g)}
    > td.m {background-image: url(middle_tab. png)}
    > td.right {width: 20px; background-image: url(right_tab.p ng)}
    > </style>
    > ---------------
    > In IE following html works fine and td.left & td.right has width 20[/color]
    pixels.[color=blue]
    > In Mozilla td.left & td.right dissapear (because they don't have contents)
    > What I can do for width in Mozilla? I want exactly 20 pixels width
    > ---------------
    > <table><tr>
    > <td class=left><td class=m>Tab1<td class=right>
    > </tr></table>
    > ---------------[/color]

    Perhaps try including &nbsp; in the empty cells? As in:
    <table><tr>
    <td class="left">&n bsp;</td>
    <td class="m">Tab1</td>
    <td class="right">& nbsp;</td>
    </tr></table>

    HTH.
    -Peter Foti



    Comment

    • Steve Pugh

      #3
      Re: td {width: 20px}

      "<- Chameleon ->" <cham_gss@hotma il.com> wrote:
      [color=blue]
      >---------------
      ><style>
      >td.left {width: 20px; background-image: url(left_tab.pn g)}
      >td.m {background-image: url(middle_tab. png)}
      >td.right {width: 20px; background-image: url(right_tab.p ng)}
      ></style>
      >---------------
      >In IE following html works fine and td.left & td.right has width 20 pixels.
      >In Mozilla td.left & td.right dissapear (because they don't have contents)
      >What I can do for width in Mozilla? I want exactly 20 pixels width
      >---------------
      ><table><tr>
      ><td class=left><td class=m>Tab1<td class=right>
      ></tr></table>
      >---------------[/color]

      That doesn't look much like a table to me. Are you sure that there
      isn't some other markup that more accurately describes your content?
      This may help:


      Anyway,

      table { empty-cells: show;}

      Steve

      --
      "My theories appal you, my heresies outrage you,
      I never answer letters and you don't like my tie." - The Doctor

      Steve Pugh <steve@pugh.net > <http://steve.pugh.net/>

      Comment

      • JP. Baker

        #4
        Re: td {width: 20px}

        In article <bls7ol$aqk$1@n ic.grnet.gr>, <- Chameleon -> wrote:[color=blue]
        >In IE following html works fine and td.left & td.right has width 20 pixels.
        >In Mozilla td.left & td.right dissapear (because they don't have contents)
        >What I can do for width in Mozilla? I want exactly 20 pixels width[/color]

        min-width: 20px; max-width: 20px; ???

        nhoJ
        --
        John P Baker

        Comment

        • Stan Brown

          #5
          Re: td {width: 20px}

          In article <bls7ol$aqk$1@n ic.grnet.gr> in
          comp.infosystem s.www.authoring.stylesheets, <- Chameleon ->
          <cham_gss@hotma il.com> wrote:
          [color=blue]
          >In IE following html works fine and td.left & td.right has width 20 pixels.
          >In Mozilla td.left & td.right dissapear (because they don't have contents)
          >What I can do for width in Mozilla?[/color]

          Give them content, even if it's only &nbsp; -- or look into border
          properties in CSS.
          [color=blue]
          >I want exactly 20 pixels width[/color]

          No, you don't. If you had 20 pixels of content you might, repeat
          might, want to specify 20 pixels width; but you told us those
          cells have _no_ content. You do not want to be using a table in that
          way merely for layout -- and you probably don't want to be doing
          your layout in pixels.

          --
          Stan Brown, Oak Road Systems, Cortland County, New York, USA
          DRAGON222 menjadi link resmi Sportsbook terunggul . Sistem cepat respon, tampilan sangat lancar anti lag, dan kemungkinan menang terjadi pada tekad kuat anda.

          HTML 4.01 spec: http://www.w3.org/TR/html401/
          validator: http://validator.w3.org/
          CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
          2.1 changes: http://www.w3.org/TR/CSS21/changes.html
          validator: http://jigsaw.w3.org/css-validator/

          Comment

          Working...