tablerow separation

Discussion in 'HTML' started by Frank, Jan 30, 2007.

  1. Frank

    Frank Guest

    Hi all,
    in an HTML table (with css file) I want to have a separation line after
    every 3rd row. How can I do that?
    Thanks
    Frank
     
    Frank, Jan 30, 2007
    #1
    1. Advertising

  2. Frank wrote:

    > in an HTML table (with css file) I want to have a separation line
    > after every 3rd row. How can I do that?


    Without more details, try this, where N is the number of columns in your
    data:

    <td colspan="N">&nbsp;</td>

    How are you generating the table?

    --
    -bts
    -Motorcycles defy gravity; cars just suck
     
    Beauregard T. Shagnasty, Jan 30, 2007
    #2
    1. Advertising

  3. Beauregard T. Shagnasty wrote:
    > Frank wrote:
    >
    >> in an HTML table (with css file) I want to have a separation line
    >> after every 3rd row. How can I do that?

    >
    > Without more details, try this, where N is the number of columns in your
    > data:
    >
    > <td colspan="N">&nbsp;</td>
    >


    Not sure what OP means by separation line, if just a 'visual' marker I
    would just adjust the border and not insert a blank row, easy with style,

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
    <meta http-equiv="content-language" content="en-us">

    <title>With Css</title>

    <style type="text/css">
    TABLE { border-collapse: collapse; border: 3px solid #000; }
    TD { border: 1px solid #888; margin: 0; padding: .5em; }
    TR.spacer TD{ border-bottom: 10px solid #f00; }
    </style>

    </head>
    <body>

    <table>
    <caption>Every Third</caption>
    <tr><td>A1</td><td>B1</td><td>C1</td></tr>
    <tr><td>A2</td><td>B2</td><td>C2</td></tr>
    <tr class="spacer"><td>A3</td><td>B3</td><td>C3</td></tr>
    <tr><td>A4</td><td>B4</td><td>C4</td></tr>
    <tr><td>A5</td><td>B5</td><td>C5</td></tr>
    <tr class="spacer"><td>A6</td><td>B6</td><td>C6</td></tr>
    <tr><td>A7</td><td>B7</td><td>C7</td></tr>
    </table>
    </body>
    </html>


    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Jan 30, 2007
    #3
  4. Frank

    dorayme Guest

    In article <c0f2c$45bf6137$40cba776$>,
    "Jonathan N. Little" <> wrote:

    > Beauregard T. Shagnasty wrote:
    > > Frank wrote:
    > >
    > >> in an HTML table (with css file) I want to have a separation line
    > >> after every 3rd row. How can I do that?

    > >
    > > Without more details, try this, where N is the number of columns in your
    > > data:
    > >
    > > <td colspan="N">&nbsp;</td>
    > >

    >
    > Not sure what OP means by separation line, if just a 'visual' marker I
    > would just adjust the border and not insert a blank row, easy with style,
    >
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    > "http://www.w3.org/TR/html4/strict.dtd">
    > <html>
    > <head>


    Perhaps this is taking the idea of a separation line too far, a
    thick red border? It is not the particular colour I am saying is
    is "too far", any colour at all, see what happens if he wants
    white, look at how the main table black border gets gaps.

    So, I think not the best solution given likely pleasant look
    requirements.

    --
    dorayme
     
    dorayme, Jan 30, 2007
    #4
  5. Frank

    Frank Guest

    Thank you all,
    Jonathans solution is fine, although with a bit thinner line, but that I can
    do myself.
    I could not find the right solution, must have done something wrong all the
    time.
    Regards
    Frank
    "dorayme" <> wrote in message
    news:...
    > In article <c0f2c$45bf6137$40cba776$>,
    > "Jonathan N. Little" <> wrote:
    >
    >> Beauregard T. Shagnasty wrote:
    >> > Frank wrote:
    >> >
    >> >> in an HTML table (with css file) I want to have a separation line
    >> >> after every 3rd row. How can I do that?
    >> >
    >> > Without more details, try this, where N is the number of columns in
    >> > your
    >> > data:
    >> >
    >> > <td colspan="N">&nbsp;</td>
    >> >

    >>
    >> Not sure what OP means by separation line, if just a 'visual' marker I
    >> would just adjust the border and not insert a blank row, easy with style,
    >>
    >> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    >> "http://www.w3.org/TR/html4/strict.dtd">
    >> <html>
    >> <head>

    >
    > Perhaps this is taking the idea of a separation line too far, a
    > thick red border? It is not the particular colour I am saying is
    > is "too far", any colour at all, see what happens if he wants
    > white, look at how the main table black border gets gaps.
    >
    > So, I think not the best solution given likely pleasant look
    > requirements.
    >
    > --
    > dorayme
     
    Frank, Jan 31, 2007
    #5
  6. dorayme wrote:

    <snip>

    > Perhaps this is taking the idea of a separation line too far, a
    > thick red border? It is not the particular colour I am saying is
    > is "too far", any colour at all, see what happens if he wants
    > white, look at how the main table black border gets gaps.
    >

    Com'on dorayme, you know me better. I know style. I used red to make a
    clear example of how the process works. Never intended one to use CSS
    exactly as in the example!

    It is just a blank row in a table has a different semantic meaning that
    just a wider border. Depends on why OP needs the separation. If to make
    a change in the relation of the data then semantically one should
    separate the data with separate tables!

    If the reason is for clarity with large multi-column multi-row table
    then tinted row/column backgrounds on my border solution would be
    applicable.

    But if it is for some special spacing to hang part of a web page on,
    then one should stop using a table for layout.

    Of course if Frank here had suppled a URL, there'd be no mystery!


    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Jan 31, 2007
    #6
  7. Frank

    dorayme Guest

    In article <62552$45c0a867$40cba7b8$>,
    "Jonathan N. Little" <> wrote:

    > dorayme wrote:
    >
    > <snip>
    >
    > > Perhaps this is taking the idea of a separation line too far, a
    > > thick red border? It is not the particular colour I am saying is
    > > is "too far", any colour at all, see what happens if he wants
    > > white, look at how the main table black border gets gaps.
    > >

    > Com'on dorayme, you know me better. I know style. I used red to make a
    > clear example of how the process works. Never intended one to use CSS
    > exactly as in the example!


    C'mon* Jonathan, of course I know about examples and trying to
    read the essentials through them. But please read what I said. I
    specifically discounted the particular colour issue. I was
    pointing to what I perceived to be a deeper problem. Which can be
    seen if you do what I indicated.

    Since it is you, if you cannot see what I am talking about, I
    will dig it out and make you a nice pic of what I see with your
    code when someone wants to have a plain white bg. Also a pic of
    where there is a tint (it really is not the colour that matters
    but the intruding of it into the main table border).

    I would have thought the natural thing would be to have the row
    that ends just before the gap showing its normal bottom border
    (made up of the composing cell bottom borders), then a gap that
    does not break the main table thick border. Perhaps what I see is
    browser dependent but it appears on my Safari and FF.

    No offence, Jonathan, but old B's solution, visually if not
    semantically, looked a better bet. But you may be able to modify
    yours and have the whole world.

    In a way, it is not just about what the OP might accept, the fact
    is that he has thrown a carcass into this lion's den and we are
    having a chew. <g>

    * that's the Oz spelling

    --
    dorayme
     
    dorayme, Jan 31, 2007
    #7
  8. dorayme wrote:
    > In article <62552$45c0a867$40cba7b8$>,
    > "Jonathan N. Little" <> wrote:

    <snip>
    >> Com'on dorayme, you know me better. I know style. I used red to make a
    >> clear example of how the process works. Never intended one to use CSS
    >> exactly as in the example!

    >
    > C'mon* Jonathan, of course I know about examples and trying to
    > read the essentials through them.


    Thank you, dang I was struggling trying to discover how to spell that!
    By the time spent pondering I just could have spelled it all out!

    > But please read what I said. I
    > specifically discounted the particular colour issue. I was
    > pointing to what I perceived to be a deeper problem. Which can be
    > seen if you do what I indicated.


    Well it went in though my eyes but apparently didn't tickle the 'old
    grey cells' properly to comprehend it! Sorry, I see. However we really
    do not know what the OP is *really* trying to do since there is no code
    of his attempts provided.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Feb 1, 2007
    #8
  9. Frank

    dorayme Guest

    In article <33f18$45c139ba$40cba7b8$>,
    "Jonathan N. Little" <> wrote:

    > > But please read what I said. I
    > > specifically discounted the particular colour issue. I was
    > > pointing to what I perceived to be a deeper problem. Which can be
    > > seen if you do what I indicated.

    >
    > Well it went in though my eyes but apparently didn't tickle the 'old
    > grey cells' properly to comprehend it! Sorry, I see. However we really
    > do not know what the OP is *really* trying to do since there is no code
    > of his attempts provided.


    I know what you mean. I tried instead to imagine a practical use
    of this and I could not imagine where the effect you were
    achieving I was pointing out would be acceptable to the eye. But
    I can easily imagine wanting breaks in tables. Like, in fact, the
    effect one gets when you stick in "nothing" and one cell to span
    the row... at the cost of semantics! Which is why, though I did
    not study B's (gee, I hope he does not take the "old" bit
    personally, I will leave it out just once here to show respect)
    suggestion, it looked practical.

    --
    dorayme
     
    dorayme, Feb 1, 2007
    #9
    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. frank
    Replies:
    0
    Views:
    368
    frank
    Jul 11, 2003
  2. Steve - DND

    Click Event for TableRow?

    Steve - DND, Jul 31, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    535
    Steve - DND
    Jul 31, 2003
  3. George Durzi

    TableRow/TableCell Serverside Q

    George Durzi, Nov 5, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    739
    Nicole Calinoiu
    Nov 5, 2003
  4. Coleen

    Span in an ASP TableRow

    Coleen, Jan 26, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    473
    coleenholley
    Jan 26, 2004
  5. RobertH
    Replies:
    3
    Views:
    4,819
    RobertH
    Feb 17, 2004
Loading...

Share This Page