Problem with td rowspan

Discussion in 'HTML' started by Martin Fuchs, Dec 30, 2003.

  1. Martin Fuchs

    Martin Fuchs Guest

    hi there,

    i have a problem with a table cell in my html code. well first my table
    looks like the following:

    <table width="748" border="1" cellspacing="0" cellpadding="0"
    bgcolor="#FFFFFF">
    <tr>
    <td width="374" height="252" colspan="2" valign="top"> CONTENT 1
    </td>
    <td width="374" colspan="2" rowspan="2" valign="top"> CONTENT 2
    </td>
    </tr>
    <tr>
    <td width="187" colspan="2" valign="top" class="bg_green1"><img
    src="images/spacer.gif" width="1" height="1" alt=""></td>
    </tr>
    </table>

    the table cell in the second table row should align top without any space to
    the first table cell (containing CONTENT 1, an image).
    i can't seem to get this table cell aligned top. tried a lot but could not
    find any solution....

    the real example can be found at
    http://www.graphix.at/update_consulting/test/master_content_rechts.html

    any help would be appreciated a lot!

    thank you very much in advance and best greetings,

    martin

    (if you would like to e-mail me please remove NOSPA^M from my mail adress -
    )
     
    Martin Fuchs, Dec 30, 2003
    #1
    1. Advertising

  2. Fredo Vincentis, Dec 30, 2003
    #2
    1. Advertising

  3. Martin Fuchs

    Sid Ismail Guest

    Sid Ismail, Dec 30, 2003
    #3
  4. Martin Fuchs

    Martin Fuchs Guest

    hi sid,

    thanks for those links but if you take a look at the source code of the
    example i posted you will notice that i know html and that this code is
    valid.
    i just seem to oversee a little something and thought that i could get help.

    "Sid Ismail" <> wrote in message
    news:...
    > On Tue, 30 Dec 2003 02:45:03 GMT, "Martin Fuchs"
    > <> wrote:
    >
    > : hi there,
    > :
    > : i have a problem with a table cell in my html code.
    >
    > http://www.goddamn.co.uk/tobyink/?page=150
    > http://www.w3.org/MarkUp/Guide/
    > http://tranchant.plus.com/web/html-start
    > http://www.htmlcodetutorial.com/
    > http://www.draac.com/
    > downloadable: http://hakatai.mcli.dist.maricopa.edu/tut/download.html
    >
    > Sid
    >
     
    Martin Fuchs, Dec 30, 2003
    #4
  5. Martin Fuchs

    Martin Fuchs Guest

    hey fredo,

    i want to valign the table cell in the second table row with the first table
    cell in the first table row. the table cell i want to valign has the
    class="bg_green1"

    do you know what i mean?

    greetings, martin

    "Fredo Vincentis" <> wrote in message
    news:bsr26a$lra$...
    > "Martin Fuchs" <> wrote in message
    > news:pE5Ib.312761$...
    > > the real example can be found at
    > > http://www.graphix.at/update_consulting/test/master_content_rechts.html

    >
    > Which cells is it in your example? So what cell do you want to valign to

    the
    > top?
    >
    >
     
    Martin Fuchs, Dec 30, 2003
    #5
  6. "Martin Fuchs" <> wrote in message
    news:IqbIb.319558$...
    > hey fredo,
    >
    > i want to valign the table cell in the second table row with the first

    table
    > cell in the first table row. the table cell i want to valign has the
    > class="bg_green1"
    >


    But the cell with class bg_green1 is empty (except for a 1x1 spacer)? If you
    put something into it, it is valigned. Perhaps can you explain a bit more in
    visual terms what you want to achieve? The cell is currently empty and has a
    green background. It is located to the left of your Welcome text. Do you
    want the cell to appear at a different position? Or will you have something
    inside the cell that you want valigned?
    >
    > "Fredo Vincentis" <> wrote in message
    > news:bsr26a$lra$...
    > > "Martin Fuchs" <> wrote in message
    > > news:pE5Ib.312761$...
    > > > the real example can be found at
    > > >

    http://www.graphix.at/update_consulting/test/master_content_rechts.html
    > >
    > > Which cells is it in your example? So what cell do you want to valign to

    > the
    > > top?
    > >
    > >

    >
    >
     
    Fredo Vincentis, Dec 30, 2003
    #6
  7. Martin Fuchs

    Martin Fuchs Guest

    "Fredo Vincentis" <> wrote in message
    news:bsrik2$1frh$...
    > But the cell with class bg_green1 is empty (except for a 1x1 spacer)? If

    you
    > put something into it, it is valigned. Perhaps can you explain a bit more

    in
    > visual terms what you want to achieve?


    hi fredo,

    well the position of the cell is alright. it's left to my welcome text and
    beneith the cell containing the image.
    what i want to achieve is that the table cell with the green background
    valigns from just beneith the cell with the image to the bottom of the
    table. if i write text into that cell the text valigns top within that cell,
    but the cell does not valign up to the cell containing the image, so there
    is white space under the image. do you know what i mean?

    thanks, martin
     
    Martin Fuchs, Dec 30, 2003
    #7
  8. "Martin Fuchs" <> wrote in message
    news:pAcIb.320951$...
    > "Fredo Vincentis" <> wrote in message
    > news:bsrik2$1frh$...
    > > But the cell with class bg_green1 is empty (except for a 1x1 spacer)? If

    > you
    > > put something into it, it is valigned. Perhaps can you explain a bit

    more
    > in
    > > visual terms what you want to achieve?

    >
    > hi fredo,
    >
    > well the position of the cell is alright. it's left to my welcome text and
    > beneith the cell containing the image.
    > what i want to achieve is that the table cell with the green background
    > valigns from just beneith the cell with the image to the bottom of the
    > table. if i write text into that cell the text valigns top within that

    cell,
    > but the cell does not valign up to the cell containing the image, so there
    > is white space under the image. do you know what i mean?


    Ah, okay. What you actually want is not valign - valign is only to align
    content that is sitting inside a table cell, not for the cell itself.

    To be honest, I think the easiest solution would be not to break the left
    half into two rows, but rather make it one big cell. The entire left cell
    could have your green background (the colour wouldn't be visible behind the
    image anyway, so it would start after the image is finished).

    For example:

    <table>
    <tr>

    <td class=bg_green1>
    <img src="uc01.jpg"><br>
    <!-- here starts the green area. You can insert some content, if you want or
    leave it empty -->
    </td>

    <td>
    Willkommen bei Update, etc etc.
    </td>

    </tr>
    </table>

    An even nicer solution would be to forget about tables and use css to layout
    the site. It makes the code much cleaner and has several advantages in
    accessibility.

    Does this help?
     
    Fredo Vincentis, Dec 30, 2003
    #8
  9. Martin Fuchs

    Martin Fuchs Guest

    "Fredo Vincentis" <> wrote in message
    news:bsrmeb$1go7$...
    > To be honest, I think the easiest solution would be not to break the left
    > half into two rows, but rather make it one big cell.


    hi fredo,

    i decided to do it like this (nor braking the left cell into two rows,
    although i just dont understand why this code does not work. opera 7
    displays everything right. ie and ns dont... well it works at least without
    two table rows.

    thanks for your help!

    greetings,
    martin
     
    Martin Fuchs, Dec 30, 2003
    #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. Eric
    Replies:
    4
    Views:
    2,649
  2. Gawel
    Replies:
    5
    Views:
    436
    Gawel
    Jun 10, 2004
  3. Bruce W...1

    colspan and rowspan problems

    Bruce W...1, Oct 22, 2003, in forum: HTML
    Replies:
    2
    Views:
    3,310
    Jerry Perkins
    Oct 22, 2003
  4. Klaus Wertler

    Colspan and rowspan

    Klaus Wertler, Nov 25, 2003, in forum: HTML
    Replies:
    8
    Views:
    1,448
    Sid Ismail
    Nov 27, 2003
  5. William
    Replies:
    8
    Views:
    478
    Jonathan N. Little
    Jan 14, 2007
Loading...

Share This Page