hey i have an html issue

Discussion in 'HTML' started by catalyst, Feb 2, 2008.

  1. catalyst

    catalyst Guest

    The following is the scheme...
    <table>
    <tr>
    <td>cellA</td>
    <td>cellB</td>
    </tr>
    <tr>
    <td>cellC<td><!--this is the middle where the content goes-->
    </tr>
    <tr colspan="3"><td>cellD</td> <!--here is the last row for copyright-->
    </table>

    I tried all kind of combinations, but don't have a clue how to make cellC
    that expands in the middle, i tried to use both colspan and rowspan together
    but didn't worked...
    The cellA goes over cellC so pushes the cellB out of the table. ...So the
    first row would need to have two cells, second row takes the "width" of this
    two and the third row takes the "width" of the whole(i.e.of that two-cellA
    and cellB), the third row always works with the colspan="3". This must be
    some trick...of some kind to make this work.

    Thanks,
    c.
     
    catalyst, Feb 2, 2008
    #1
    1. Advertising

  2. Gazing into my crystal ball I observed "catalyst" <>
    writing in news:fo2bgn$s1i$:

    > The following is the scheme...
    ><table>
    ><tr>
    ><td>cellA</td>
    ><td>cellB</td>
    ></tr>
    ><tr>
    ><td>cellC<td><!--this is the middle where the content goes-->
    ></tr>
    ><tr colspan="3"><td>cellD</td> <!--here is the last row for
    >copyright--> </table>
    >
    > I tried all kind of combinations, but don't have a clue how to make
    > cellC that expands in the middle, i tried to use both colspan and
    > rowspan together but didn't worked...
    > The cellA goes over cellC so pushes the cellB out of the table. ...So
    > the first row would need to have two cells, second row takes the
    > "width" of this two and the third row takes the "width" of the
    > whole(i.e.of that two-cellA and cellB), the third row always works
    > with the colspan="3". This must be some trick...of some kind to make
    > this work.
    >
    > Thanks,
    > c.
    >
    >
    >


    First, use the right tool for the job. Tables are for tabular data.
    Google for CSS three column layout. Plenty of examples, or search
    through this group for examples.

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
     
    Adrienne Boswell, Feb 2, 2008
    #2
    1. Advertising

  3. Gazing into my crystal ball I observed "catalyst" <>
    writing in news:fo2bgn$s1i$:

    > The following is the scheme...
    ><table>
    ><tr>
    ><td>cellA</td>
    ><td>cellB</td>
    ></tr>
    ><tr>
    ><td>cellC<td><!--this is the middle where the content goes-->
    ></tr>
    ><tr colspan="3"><td>cellD</td> <!--here is the last row for
    >copyright--> </table>
    >
    > I tried all kind of combinations, but don't have a clue how to make
    > cellC that expands in the middle, i tried to use both colspan and
    > rowspan together but didn't worked...
    > The cellA goes over cellC so pushes the cellB out of the table. ...So
    > the first row would need to have two cells, second row takes the
    > "width" of this two and the third row takes the "width" of the
    > whole(i.e.of that two-cellA and cellB), the third row always works
    > with the colspan="3". This must be some trick...of some kind to make
    > this work.
    >
    > Thanks,
    > c.
    >
    >
    >


    First, use the right tool for the job. Tables are for tabular data.
    Google for CSS three column layout. Plenty of examples, or search
    through this group for examples.

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
     
    Adrienne Boswell, Feb 2, 2008
    #3
  4. catalyst

    Els Guest

    catalyst wrote:

    > The following is the scheme...
    > <table>
    > <tr>
    > <td>cellA</td>
    > <td>cellB</td>
    > </tr>
    > <tr>
    > <td>cellC<td><!--this is the middle where the content goes-->
    > </tr>
    > <tr colspan="3"><td>cellD</td> <!--here is the last row for copyright-->
    > </table>
    >
    > I tried all kind of combinations, but don't have a clue how to make cellC
    > that expands in the middle, i tried to use both colspan and rowspan together
    > but didn't worked...
    > The cellA goes over cellC so pushes the cellB out of the table. ...So the
    > first row would need to have two cells, second row takes the "width" of this
    > two and the third row takes the "width" of the whole(i.e.of that two-cellA
    > and cellB), the third row always works with the colspan="3". This must be
    > some trick...of some kind to make this work.


    There is no trick, you just need to count your cells.
    You have 2 cells in row one, 1 in row 2, and 3 (one that has
    colspan="3") in the third row. What you need is an equal amount of
    cells in each row.

    What I *think* you want, is:
    <table>
    <tr>
    <td> A </td>
    <td> B </td>
    </tr>
    <tr>
    <td colspan="2"> C </td>
    </tr>
    <tr>
    <td colspan="2"> D </td>
    </tr>
    </table>

    If that's not what you want, I think you'll need to make a nice
    drawing that shows what you want.

    --
    Els http://locusmeus.com/
     
    Els, Feb 2, 2008
    #4
  5. catalyst

    Sid Guest

    On Sat, 2 Feb 2008 19:07:17 +0100, "catalyst" <> wrote:

    : <tr colspan="3">


    ? Check for legitimacy.

    Sid
     
    Sid, Feb 2, 2008
    #5
  6. catalyst

    Neredbojias Guest

    Well bust mah britches and call me cheeky, on Sat, 02 Feb 2008 18:07:17
    GMT catalyst scribed:

    > The following is the scheme...
    > <table>
    > <tr>
    > <td>cellA</td>
    > <td>cellB</td>
    > </tr>
    > <tr>
    > <td>cellC<td><!--this is the middle where the content goes-->
    > </tr>
    > <tr colspan="3"><td>cellD</td> <!--here is the last row for
    > copyright--> </table>
    >
    > I tried all kind of combinations, but don't have a clue how to make
    > cellC that expands in the middle, i tried to use both colspan and
    > rowspan together but didn't worked...
    > The cellA goes over cellC so pushes the cellB out of the table. ...So
    > the first row would need to have two cells, second row takes the
    > "width" of this two and the third row takes the "width" of the
    > whole(i.e.of that two-cellA and cellB), the third row always works
    > with the colspan="3". This must be some trick...of some kind to make
    > this work.


    How 'bout:

    <div>
    <div style="float:left">cellA</div><div>cellB</div>
    <div>cellC</div>
    <div>cellD</div>
    </div>

    --
    Neredbojias
    Riches are their own reward.
     
    Neredbojias, Feb 2, 2008
    #6
  7. catalyst

    catalyst Guest

    I have solved the problem with padding option.
    Miraculously, it helped. In the cellB i added padding-right: 805px;" which
    turned the picture in the right place, again, as it should be. It seems,
    there's no solution with tables to do this, or i'm not to clever to do such
    a manevouar. hmm...it's hard to to a layout with tables, but different i do
    not know. I think i'll specialise myself ...heh :)
    Thanks for Your helps!
     
    catalyst, Feb 2, 2008
    #7
  8. catalyst

    richard Guest

    On Sat, 2 Feb 2008 19:07:17 +0100, "catalyst" <> wrote:

    >The following is the scheme...
    ><table>
    ><tr>
    ><td>cellA</td>
    ><td>cellB</td>
    ></tr>
    ><tr>
    ><td>cellC<td><!--this is the middle where the content goes-->
    ></tr>
    ><tr colspan="3"><td>cellD</td> <!--here is the last row for copyright-->
    ></table>
    >
    >I tried all kind of combinations, but don't have a clue how to make cellC
    >that expands in the middle, i tried to use both colspan and rowspan together
    >but didn't worked...
    >The cellA goes over cellC so pushes the cellB out of the table. ...So the
    >first row would need to have two cells, second row takes the "width" of this
    >two and the third row takes the "width" of the whole(i.e.of that two-cellA
    >and cellB), the third row always works with the colspan="3". This must be
    >some trick...of some kind to make this work.
    >
    >Thanks,
    >c.
    >



    Then try this:

    <tr><td>row 1 cell a</td><td>row 1 cell b</td></tr>
    <tr><td colspan="2">row 2 cell c</td></tr>
    <tr><td cplspan="2">row 3 cell d</td></tr>

    You must define each row without the same number of cells to span.
    Otherwise, it defaults to a colspan="1" leaving a blank empty cell.
     
    richard, Feb 2, 2008
    #8
  9. catalyst

    Guest

    Adreinne is right, tables are for tabular data. Since i have seen this
    problem pop up here before I decided to try and make a little demo to
    help. I used HTML/CSS for this demo. "/** **/" Annotates comments in
    CSS. I used code demonstrated at glish.com/css from their "4 column
    all fluid" example.

    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
    <title>4 columns all fluid</title>
    <link rel="stylesheet" type="text/css" href="main.css" />
    </head>

    <body>
    <div id="container">
    <div id="A">
    <p>This is A</p>
    </div>
    <div id="B">
    <p>This is B</p>
    </div>
    <div id="C">
    <p>This is C</p>
    </div>
    <div id="D">
    <p>This is D</p>
    </div>
    </div>
    </body>
    </html>

    body {
    background-color: #DDD;
    }

    #A{ /** This Changes the style of the column just copypasta and change
    the ID for more "cells" **/
    width:100px;
    background-color:#EAA900;
    position:absolute;
    left:10%;
    width:10%;
    }

    #B{
    width:100px;
    background-color:#EA6000;
    position:absolute;
    left:20%;
    width:10%;
    }

    #C{
    width:100px;
    background-color:#0098EA;
    position:absolute;
    left:30%;
    width:10%;
    }

    #D{
    width:100px;
    background-color:#EA89DB;
    position:absolute;
    left:40%;
    width:10%;
    }

    --------------------------------------------------------------------------------------------------------------------------------------
    If anyone wants to expand on this or make proper changes please feel
    free to do so. I hope that this post helps catalyst.

    On Feb 2, 12:29 pm, Adrienne Boswell <> wrote:
    > Gazing into my crystal ball I observed "catalyst" <>
    > writing innews:fo2bgn$s1i$:
    >
    >
    >
    > > The following is the scheme...
    > ><table>
    > ><tr>
    > ><td>cellA</td>
    > ><td>cellB</td>
    > ></tr>
    > ><tr>
    > ><td>cellC<td><!--this is the middle where the content goes-->
    > ></tr>
    > ><tr colspan="3"><td>cellD</td> <!--here is the last row for
    > >copyright--> </table>

    >
    > > I tried all kind of combinations, but don't have a clue how to make
    > > cellC that expands in the middle, i tried to use both colspan and
    > > rowspan together but didn't worked...
    > > The cellA goes over cellC so pushes the cellB out of the table. ...So
    > > the first row would need to have two cells, second row takes the
    > > "width" of this two and the third row takes the "width" of the
    > > whole(i.e.of that two-cellA and cellB), the third row always works
    > > with the colspan="3". This must be some trick...of some kind to make
    > > this work.

    >
    > > Thanks,
    > > c.

    >
    > First, use the right tool for the job.  Tables are for tabular data.  
    > Google for CSS three column layout.  Plenty of examples, or search
    > through this group for examples.
    >
    > --
    > Adrienne Boswell at Home
    > Arbpen Web Site Design Serviceshttp://www.cavalcade-of-coding.info
    > Please respond to the group so others can share
     
    , Feb 3, 2008
    #9
  10. catalyst

    richard Guest

    On Sun, 3 Feb 2008 00:49:37 +0100, "catalyst" <> wrote:

    >I have solved the problem with padding option.
    >Miraculously, it helped. In the cellB i added padding-right: 805px;" which
    >turned the picture in the right place, again, as it should be. It seems,
    >there's no solution with tables to do this, or i'm not to clever to do such
    >a manevouar. hmm...it's hard to to a layout with tables, but different i do
    >not know. I think i'll specialise myself ...heh :)
    >Thanks for Your helps!
    >


    If you learned how to use divisions rather than relying on tables,
    your desired output would be easier.

    <div style="float;left;"> row 1 cell a</div>
    <div style="float:left;">row 1 cell b</div>
    <div style="clear:left;"> row 2 cell c</div>
    <div> row 3 cell d </div>

    Now style each div with css accordingly.
     
    richard, Feb 3, 2008
    #10
  11. catalyst

    asdf Guest

    "Adrienne Boswell" <> wrote in message
    news:Xns9A386AC6443A9arbpenyahoocom@69.28.186.121...
    > Gazing into my crystal ball I observed "catalyst" <>
    > writing in news:fo2bgn$s1i$:
    >
    >> The following is the scheme...
    >><table>
    >><tr>
    >><td>cellA</td>
    >><td>cellB</td>
    >></tr>
    >><tr>
    >><td>cellC<td><!--this is the middle where the content goes-->
    >></tr>
    >><tr colspan="3"><td>cellD</td> <!--here is the last row for
    >>copyright--> </table>
    >>
    >> I tried all kind of combinations, but don't have a clue how to make
    >> cellC that expands in the middle, i tried to use both colspan and
    >> rowspan together but didn't worked...
    >> The cellA goes over cellC so pushes the cellB out of the table. ...So
    >> the first row would need to have two cells, second row takes the
    >> "width" of this two and the third row takes the "width" of the
    >> whole(i.e.of that two-cellA and cellB), the third row always works
    >> with the colspan="3". This must be some trick...of some kind to make
    >> this work.
    >>
    >> Thanks,
    >> c.
    >>
    >>
    >>

    >
    > First, use the right tool for the job. Tables are for tabular data.
    > Google for CSS three column layout. Plenty of examples, or search
    > through this group for examples.
    >
    > --
    > Adrienne Boswell at Home
    > Arbpen Web Site Design Services
    > http://www.cavalcade-of-coding.info
    > Please respond to the group so others can share
    >


    She's right u know :)
     
    asdf, Feb 3, 2008
    #11
    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. zdrakec

    Hey Teemu

    zdrakec, Jul 12, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    454
    Teemu Keiski
    Jul 12, 2005
  2. icurfmn8

    Database/profile Hey here's a puzzle

    icurfmn8, Feb 7, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    336
  3. Ike

    Hey Roedy!

    Ike, Nov 11, 2003, in forum: Java
    Replies:
    3
    Views:
    616
    Roedy Green
    Nov 15, 2003
  4. Robocop
    Replies:
    2
    Views:
    453
    Andrew Hobbs
    Feb 22, 2004
  5. C-man
    Replies:
    3
    Views:
    352
    David Hilsee
    Aug 3, 2004
Loading...

Share This Page