table row borders

Discussion in 'HTML' started by dx, May 5, 2004.

  1. dx

    dx Guest

    How do you display only the horizontal borders (grid lines) in a table. What
    is the css settings?

    Much thanks in advance.
    Stan
    dx, May 5, 2004
    #1
    1. Advertising

  2. dx

    Mitja Guest

    dx <>
    (news:) wrote:
    > How do you display only the horizontal borders (grid lines) in a
    > table. What is the css settings?
    >
    > Much thanks in advance.
    > Stan


    td {
    border-top: solid black 1px; /*for example*/
    border-right: solid black 1px;
    border-bottom: solid black 1px;
    border-left: solid black 1px;
    }

    or, shorter:

    td {
    border: solid black 1px;
    border-width: 1px 0;
    }

    See w3c specs.

    Mitja
    Mitja, May 5, 2004
    #2
    1. Advertising

  3. dx

    Sid Ismail Guest

    Sid Ismail, May 5, 2004
    #3
  4. dx

    Jay Guest

    "Mitja" <> wrote in message
    news:c7bjvj$7m1$...
    > dx <>
    > (news:) wrote:
    > > How do you display only the horizontal borders (grid lines) in a
    > > table. What is the css settings?
    > >
    > > Much thanks in advance.
    > > Stan

    >
    > td {
    > border-top: solid black 1px; /*for example*/
    > border-right: solid black 1px;
    > border-bottom: solid black 1px;
    > border-left: solid black 1px;
    > }
    >
    > or, shorter:
    >
    > td {
    > border: solid black 1px;
    > border-width: 1px 0;
    > }
    >
    > See w3c specs.


    The OP wanted only horizontal borders.

    td {
    border-top: solid black 1px;
    border-bottom: solid black 1px;
    }

    --
    "Some see the glass as half-empty;
    some see the glass as half-full.
    I see the glass as too big." - George Carlin

    - J
    Jay, May 6, 2004
    #4
  5. dx

    Hywel Guest

    In article <m%vmc.3977$>, Jay says...
    >
    > "Mitja" <> wrote in message
    > news:c7bjvj$7m1$...
    > > dx <>
    > > (news:) wrote:
    > > > How do you display only the horizontal borders (grid lines) in a
    > > > table. What is the css settings?
    > > >
    > > > Much thanks in advance.
    > > > Stan

    > >
    > > td {
    > > border-top: solid black 1px; /*for example*/
    > > border-right: solid black 1px;
    > > border-bottom: solid black 1px;
    > > border-left: solid black 1px;
    > > }
    > >
    > > or, shorter:
    > >
    > > td {
    > > border: solid black 1px;
    > > border-width: 1px 0;
    > > }
    > >
    > > See w3c specs.

    >
    > The OP wanted only horizontal borders.


    Then the OP can work it out from the example given. What if next week
    the OP wants to know how to do vertical borders?

    > td {
    > border-top: solid black 1px;
    > border-bottom: solid black 1px;
    > }


    That will give 2 pixel wide borders, apart from at the top and bottom of
    the table.

    --
    Hywel I do not eat quiche
    http://kibo.org.uk/
    http://kibo.org.uk/mfaq.php
    Hywel, May 6, 2004
    #5
  6. dx

    Mitja Guest

    Jay <>
    (news:m%vmc.3977$) wrote:
    > "Mitja" <> wrote in message
    > news:c7bjvj$7m1$...
    >> dx <>
    >> (news:) wrote:
    >>> How do you display only the horizontal borders (grid lines) in a
    >>> table. What is the css settings?
    >>>
    >>> Much thanks in advance.
    >>> Stan

    >>
    >> td {
    >> border-top: solid black 1px; /*for example*/
    >> border-right: solid black 1px;
    >> border-bottom: solid black 1px;
    >> border-left: solid black 1px;
    >> }
    >>
    >> or, shorter:
    >>
    >> td {
    >> border: solid black 1px;
    >> border-width: 1px 0;
    >> }
    >>
    >> See w3c specs.

    >
    > The OP wanted only horizontal borders.
    >
    > td {
    > border-top: solid black 1px;
    > border-bottom: solid black 1px;
    > }


    My bad. Copy-pasted the first line four times without thinking.
    The second, better example, though, does what OP intended. Or at least
    partially - as it's been pointed out, it makes for 2-px borders.
    Mitja, May 6, 2004
    #6
  7. dx

    Sid Ismail Guest

    On Thu, 06 May 2004 19:04:50 GMT, "Jay" <> wrote:

    :
    : "Mitja" <> wrote in message
    : news:c7bjvj$7m1$...
    : > dx <>
    : > (news:) wrote:
    : > > How do you display only the horizontal borders (grid lines) in a
    : > > table. What is the css settings?
    : > >
    : > > Much thanks in advance.
    : > > Stan
    : >
    : > td {
    : > border-top: solid black 1px; /*for example*/
    : > border-right: solid black 1px;
    : > border-bottom: solid black 1px;
    : > border-left: solid black 1px;
    : > }
    : >
    : > or, shorter:
    : >
    : > td {
    : > border: solid black 1px;
    : > border-width: 1px 0;
    : > }
    : >
    : > See w3c specs.
    :
    : The OP wanted only horizontal borders.
    :
    : td {
    : border-top: solid black 1px;
    : border-bottom: solid black 1px;
    : }


    Remember to put border-collapse:collapse in the table CSS definition.

    Sid
    Sid Ismail, May 6, 2004
    #7
    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. news frontiernet.net
    Replies:
    6
    Views:
    1,191
    news frontiernet.net
    Dec 5, 2003
  2. George
    Replies:
    9
    Views:
    4,900
    George
    Oct 25, 2004
  3. phl
    Replies:
    1
    Views:
    4,345
    Martin Jay
    Jun 8, 2006
  4. Acladeus
    Replies:
    0
    Views:
    963
    Acladeus
    Mar 1, 2007
  5. D
    Replies:
    0
    Views:
    205
Loading...

Share This Page