row bottom border in inner table not matching up with row border in outer table

Discussion in 'HTML' started by phl, Jun 7, 2006.

  1. phl

    phl Guest

    Hi,

    I have been having problems aligning the bottom borders of sub table
    within my main table. I need to have a table within a table. Each row
    has a bottom border. My problem is where the last row of my sub table,
    meets the next row of the main table. I don't seem to be ablt to get
    them to match up, so I get two lines here, where I should have one.

    Has anyone have problems like this before, is there anyway I can fix
    it, or alternate solution?

    Cheers, here's the below. - phl

    <style>
    .rstyle td {font:11px tahoma ;border-top:solid 1px
    #000;font-weight:bold }
    .tstyle td,.fix table td{border-bottom:solid 1px #ccc}.t1
    td,.t1 th{padding-left:0px}
    .tstyle td,th{vertical-align:top;padding:2px 0px 2px
    0!important
    </style>

    <table cellpadding="0" border="0" cellspacing="0" class="tstyle">

    <tr><td>outer Table row 1</td><td style="width:70px">o elem 2</td></tr>

    <tr><td style="border-bottom:none" colspan="2">

    <table cellpadding="0" cellspacing="0">
    <tr><td>inner table row 1</td ><td>ielem1</td></tr>

    <tr><td>inner table row 2</td ><td>ielem2</td></tr>

    <tr><td>inner table row 3</td ><td>ielem3</td></tr>

    </table></td></tr>

    <tr class="rstyle"><td>outer Table row 2</td ><td>oelem 2</td></tr>
    </table>

    <table >
     
    phl, Jun 7, 2006
    #1
    1. Advertising

  2. phl

    Martin Jay Guest

    In message <>, phl
    <> writes

    >I have been having problems aligning the bottom borders of sub table
    >within my main table. I need to have a table within a table. Each row
    >has a bottom border. My problem is where the last row of my sub table,
    >meets the next row of the main table. I don't seem to be ablt to get
    >them to match up, so I get two lines here, where I should have one.
    >
    >Has anyone have problems like this before, is there anyway I can fix
    >it, or alternate solution?


    Remove the border from the bottom <td> of the first table:

    CSS:

    .none{ border: none; }

    And change:

    <td>inner table row 3</td>

    to:

    <td class="none">inner table row 3</td>
    --
    Martin Jay
    Phone/SMS: +44 7740 191877
    Fax: +44 870 915 2124
     
    Martin Jay, Jun 8, 2006
    #2
    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. lonelyplanet999

    Access outer / inner class variables query

    lonelyplanet999, Nov 11, 2003, in forum: Java
    Replies:
    3
    Views:
    5,340
    lonelyplanet999
    Nov 18, 2003
  2. phl
    Replies:
    2
    Views:
    2,006
  3. Replies:
    3
    Views:
    931
    richard
    Sep 24, 2006
  4. Mc Lauren Series
    Replies:
    3
    Views:
    1,376
    Neredbojias
    Feb 13, 2010
  5. Tom Y
    Replies:
    1
    Views:
    244
    Elegie
    Jul 12, 2011
Loading...

Share This Page