1px border in table cells

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jeff@thelimit.com

    1px border in table cells

    Doing this:

    td{border: 1px solid black}

    gives me 2px borders on adjacent cells. How do I get the same size
    border on inside cell walls as outside, much as <table border="1"
    cellspacing="0" > would give.

    A courtesy copy to my email would be appreciated (I'm on Google News
    at the moment).

    Jeff

  • Neal

    #2
    Re: 1px border in table cells

    On 12 Dec 2004 20:13:00 -0800, <jeff@thelimit. com> wrote:
    [color=blue]
    > Doing this:
    >
    > td{border: 1px solid black}
    >
    > gives me 2px borders on adjacent cells. How do I get the same size
    > border on inside cell walls as outside, much as <table border="1"
    > cellspacing="0" > would give.[/color]

    Look at the border-collapse property in CSS.
    [color=blue]
    > A courtesy copy to my email would be appreciated (I'm on Google News
    > at the moment).[/color]



    No excuse for not having a newsgroup server.

    Comment

    • jeff@thelimit.com

      #3
      Re: 1px border in table cells

      border-collapse: collapse

      is already in the style. Does not work in this case for IE5/6.

      I'm on a computer of someone who never uses Usenet with an ISP that
      does not support usenet.

      I do have an account that I will hook up later... as I can see the
      posting style is atrocious.

      Comment

      • lime

        #4
        Re: 1px border in table cells

        <jeff@thelimit. com> wrote in message
        news:1102911180 .458595.246550@ z14g2000cwz.goo glegroups.com.. .[color=blue]
        > Doing this:
        >
        > td{border: 1px solid black}
        >
        > gives me 2px borders on adjacent cells. How do I get the same size
        > border on inside cell walls as outside, much as <table border="1"
        > cellspacing="0" > would give.[/color]

        Assign borders left, top & bottom but not right. That way the left border of
        the adjacent cell will take care of the previous right border...

        --
        Helen, lime, et al.


        Comment

        • jeff@thelimit.com

          #5
          Re: 1px border in table cells

          border-collapse: collapse

          is already in the style. Does not work in this case for IE5/6.

          I'm on a computer of someone who never uses Usenet with an ISP that
          does not support usenet.

          I do have an account that I will hook up later... as I can see the
          posting style is atrocious.

          Comment

          • Michael Fesser

            #6
            Re: 1px border in table cells

            .oO(jeff@thelim it.com)
            [color=blue]
            >border-collapse: collapse
            >
            >is already in the style. Does not work in this case for IE5/6.[/color]

            Post an URL. border-collapse does work in IE/Win.

            Micha

            Comment

            • Remi Villatel

              #7
              Re: 1px border in table cells

              jeff@thelimit.c om wrote:
              [color=blue]
              > border-collapse: collapse
              >
              > is already in the style. Does not work in this case for IE5/6.[/color]

              I've never heard about border-collapse until today so, in order to have a
              regular border around every cell, I define the border on every cell.

              <table class="full_bor der" border="O" cellspacing="0" >
              <tr>
              <td class="right+bo ttom">Cell A1</td>
              <td class="right+bo ttom">Cell B1</td>
              <td class="bottom_o nly">Cell C1</td>
              </tr><tr>
              <td class="right_on ly">Cell A2</td>
              <td class="right_on ly">Cell B2</td>
              <td>Cell C2</td>
              </tr>
              </table>

              Every cell have the style "right+bott om", except on the right where it
              should be "bottom_onl y". And the last row must have no bottom border, so
              it's "right_only " except for the last cell.

              All missing borders are provided by the table border which also must be
              defined as a style.

              (To choose very short style names isn't a bad idea here.)

              I'd say that it's obvious you'll get a better control if you define the
              border of every cell rather than globally.

              Just my 2 hundredth of your currency,

              --
              =============== ===
              Remi Villatel
              maxilys_@_tele2 .fr
              =============== ===

              Comment

              • kchayka

                #8
                Re: 1px border in table cells

                on 2004-12-13 jeff@thelimit.c om wrote:
                [color=blue]
                > border-collapse: collapse
                >
                > is already in the style. Does not work in this case for IE5/6.[/color]

                Set border-collapse on both the table and td elements.
                You may also need to set table border-width to 0, leaving visible borders
                on just th and td elements.

                Comment

                Working...