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. Advertisements

  2. table.c7 td {border:1px solid black}
    table.c7 th {border:1px solid black}
     
    Anthony Jones, Dec 30, 2007
    #2
    1. Advertisements

  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
     
    Academia, Dec 31, 2007
    #3
  4. 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, Jan 1, 2008
    #4
  5. Academia

    Academia Guest

    Academia, Jan 1, 2008
    #5
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.