border-top not working in col

Discussion in 'HTML' started by Phil, Nov 11, 2008.

  1. Phil

    Phil Guest

    How come the <col> style doesn't render the same in both cases:


    <HTML><BODY>
    <TABLE style="border: thin solid black">
    <COL style="border-bottom:thin solid">
    <TBODY>
    <TR>
    <TD>row 1 col 1 items</TD>
    <TD>row 1 col 2 items</TD></TR>
    <TR>
    <TD>row 2 col 1 items</TD>
    <TD>row 2 col 2 items</TD></TR>
    <TR>
    <TD>row 3 col 1 items</TD>
    <TD>row 3 col 2 items</TD></TR>
    </TBODY></TABLE></BODY></HTML>



    <TABLE style="border-collapse:collapse;border: thin solid black">
    <TBODY>
    <TR>
    <TD style="border-bottom:thin solid">
    row 1 col 1 items</TD>
    <TD>row 1 col 2 items</TD></TR>
    <TR>
    <TD style="border-bottom:thin solid">row 2 col 1 items</TD>
    <TD>row 2 col 2 items</TD></TR>
    <TR>
    <TD style="border-bottom:thin solid">row 3 col 1 items</TD>
    <TD>row 3 col 2 items</TD></TR>
    </TBODY></TABLE></BODY></HTML>
    --
    Phil
     
    Phil, Nov 11, 2008
    #1
    1. Advertising

  2. Phil

    richard Guest

    On Mon, 10 Nov 2008 20:46:20 -0600, "Phil" <>
    wrote:

    >How come the <col> style doesn't render the same in both cases:
    >
    >
    ><HTML><BODY>
    ><TABLE style="border: thin solid black">
    ><COL style="border-bottom:thin solid">
    ><TBODY>
    ><TR>
    ><TD>row 1 col 1 items</TD>
    ><TD>row 1 col 2 items</TD></TR>
    ><TR>
    ><TD>row 2 col 1 items</TD>
    ><TD>row 2 col 2 items</TD></TR>
    ><TR>
    ><TD>row 3 col 1 items</TD>
    ><TD>row 3 col 2 items</TD></TR>
    ></TBODY></TABLE></BODY></HTML>
    >
    >
    >
    ><TABLE style="border-collapse:collapse;border: thin solid black">
    ><TBODY>
    ><TR>
    ><TD style="border-bottom:thin solid">
    >row 1 col 1 items</TD>
    ><TD>row 1 col 2 items</TD></TR>
    ><TR>
    ><TD style="border-bottom:thin solid">row 2 col 1 items</TD>
    ><TD>row 2 col 2 items</TD></TR>
    ><TR>
    ><TD style="border-bottom:thin solid">row 3 col 1 items</TD>
    ><TD>row 3 col 2 items</TD></TR>
    ></TBODY></TABLE></BODY></HTML>



    probably because no color was given to it.

    In the <table> tag, the border refers only to the outside perimiter,
    not the border of each cell.
     
    richard, Nov 11, 2008
    #2
    1. Advertising

  3. Phil

    Bergamot Guest

    Phil wrote:
    > How come the <col> style doesn't render
    >
    > <COL style="border-bottom:thin solid">


    Only certain properties can be styled on the col element. Border is not
    one of them.

    --
    Berg
     
    Bergamot, Nov 11, 2008
    #3
  4. Phil wrote:

    > How come the <col> style doesn't render the same in both cases:


    URL? Browser? You don't even reveal whether your snippet is used in Quirks
    mode or "Standards" mode.

    And what do expect to happen when you set a border on an element that
    denotes a column? In any case, _I_ wouldn't expect much, since columns are
    really strangers in CSS-land.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Nov 11, 2008
    #4
  5. Phil

    Phil Guest

    Thanks, I could only suspect so because I didn't see in the docs that it
    wasn't applicable.

    I just figured the col attributes would be applied to all TD elements in
    the column.



    > Phil wrote:
    >> How come the <col> style doesn't render
    >>
    >> <COL style="border-bottom:thin solid">

    >
    > Only certain properties can be styled on the col element. Border is
    > not one of them.
     
    Phil, Nov 12, 2008
    #5
  6. Phil

    Bergamot Guest

    Phil wrote:
    > Bergamot wrote:
    >>
    >> Only certain properties can be styled on the col element. Border is
    >> not one of them.

    >
    > I just figured the col attributes would be applied to all TD elements in
    > the column.


    For inheritance like that to happen, td would have to be a child of col.
    It's not - it's a child of tr. Besides, border is not an inherited property.

    --
    Berg
     
    Bergamot, Nov 12, 2008
    #6
  7. Phil

    GTalbot Guest

    On 10 nov, 21:46, "Phil" <> wrote:
    > How come the <col> style doesn't render the same in both cases:
    >
    > <HTML><BODY>
    > <TABLE style="border: thin solid black">
    > <COL style="border-bottom:thin solid">


    (...)


    > <TABLE style="border-collapse:collapse;border: thin solid black">
    > <TBODY>
    > <TR>


    Please post an URL, not code.

    "The various border properties apply to columns only if 'border-
    collapse' is set to 'collapse' on the table element."
    http://www.w3.org/TR/CSS21/tables.html#columns

    Regards, GĂ©rard
    --
    197 bugs in Internet Explorer 8
    http://www.gtalbot.org/BrowserBugsSection/MSIE8Bugs/
     
    GTalbot, Nov 25, 2008
    #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. tshad
    Replies:
    0
    Views:
    2,277
    tshad
    Jan 31, 2005
  2. phl
    Replies:
    1
    Views:
    4,375
    Martin Jay
    Jun 8, 2006
  3. Coder
    Replies:
    1
    Views:
    712
    Cowboy \(Gregory A. Beamer\)
    Jun 24, 2006
  4. =?UTF-8?B?TWFydGluIFDDtnBwaW5n?=

    border-color: #003366; border-width: 2px;

    =?UTF-8?B?TWFydGluIFDDtnBwaW5n?=, Jul 17, 2006, in forum: HTML
    Replies:
    64
    Views:
    3,563
    Adrienne Boswell
    Jul 30, 2006
  5. Replies:
    8
    Views:
    216
    Eric Sosman
    Apr 20, 2013
Loading...

Share This Page