How to make a table draw lines between cells

Discussion in 'ASP .Net Building Controls' started by Academia, Dec 26, 2007.

  1. Academia

    Academia Guest

    I think this is a simple question but I can't find the answer.

    I have in the head:
    <style type="text/css">
    table.c7 {font-family: Verdana}

    and in the body:
    <table class="c7">

    The cell are not outlined.
    How can I force the lines between the cells to be drawn?


    Thanks for any help
    Academia, Dec 26, 2007
    #1
    1. Advertising

  2. "Academia" <> wrote in message
    news:%...
    > I think this is a simple question but I can't find the answer.
    >
    > I have in the head:
    > <style type="text/css">
    > table.c7 {font-family: Verdana}
    >
    > and in the body:
    > <table class="c7">
    >
    > The cell are not outlined.
    > How can I force the lines between the cells to be drawn?
    >


    table.c7 td {border:1px solid black}
    table.c7 th {border:1px solid black}

    --
    Anthony Jones - MVP ASP/ASP.NET
    Anthony Jones, Dec 30, 2007
    #2
    1. Advertising

  3. Academia

    Academia Guest

    Works well but I can't figure the syntax.

    Does it say, for example: Any table that references class c7 apply
    {border:1px solid black} to the td's?

    Thanks

    "Anthony Jones" <> wrote in message
    news:...
    > "Academia" <> wrote in message
    > news:%...
    >> I think this is a simple question but I can't find the answer.
    >>
    >> I have in the head:
    >> <style type="text/css">
    >> table.c7 {font-family: Verdana}
    >>
    >> and in the body:
    >> <table class="c7">
    >>
    >> The cell are not outlined.
    >> How can I force the lines between the cells to be drawn?
    >>

    >
    > table.c7 td {border:1px solid black}
    > table.c7 th {border:1px solid black}
    >
    > --
    > Anthony Jones - MVP ASP/ASP.NET
    >
    >
    Academia, Dec 31, 2007
    #3
  4. "Academia" <> wrote in message
    news:OKlZUN$...
    > Works well but I can't figure the syntax.
    >
    > Does it say, for example: Any table that references class c7 apply
    > {border:1px solid black} to the td's?
    >


    Something like that yes.

    More accurately it says: Apply the style {border:1px solid black} to any td
    that is a descendant of a table element that has a class name of c7.

    See:-

    http://www.w3.org/TR/CSS21/selector.html#descendant-selectors

    --
    Anthony Jones - MVP ASP/ASP.NET
    Anthony Jones, Jan 1, 2008
    #4
  5. Academia

    Academia Guest

    thanks very much

    "Anthony Jones" <> wrote in message
    news:...
    > "Academia" <> wrote in message
    > news:OKlZUN$...
    >> Works well but I can't figure the syntax.
    >>
    >> Does it say, for example: Any table that references class c7 apply
    >> {border:1px solid black} to the td's?
    >>

    >
    > Something like that yes.
    >
    > More accurately it says: Apply the style {border:1px solid black} to any
    > td
    > that is a descendant of a table element that has a class name of c7.
    >
    > See:-
    >
    > http://www.w3.org/TR/CSS21/selector.html#descendant-selectors
    >
    > --
    > Anthony Jones - MVP ASP/ASP.NET
    >
    >
    Academia, Jan 1, 2008
    #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. Replies:
    0
    Views:
    526
  2. Björn Lange

    Lines between table cells

    Björn Lange, Apr 1, 2004, in forum: HTML
    Replies:
    4
    Views:
    566
    Dmitry Pljonkin
    Apr 2, 2004
  3. UJ
    Replies:
    8
    Views:
    61,236
  4. Mr. Magic
    Replies:
    6
    Views:
    1,315
    Andrew Morton
    Nov 17, 2009
  5. Joel Finkel

    Cells[].Text or Cells[].Controls[0]

    Joel Finkel, Sep 1, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    308
    Joel Finkel
    Sep 1, 2003
Loading...

Share This Page